Skip to content

Commit 0141256

Browse files
author
Andrei Zmievski
committed
- Fixed a leak in xml_decode(). - Fixed it so it's possible to compile as a shared extension.
1 parent 345cee6 commit 0141256

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

ext/rpc/xmlrpc/config.m4

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ sinclude(libxmlrpc/xmlrpc.m4)
1010
PHP_ARG_WITH(xmlrpc, for XMLRPC-EPI support,
1111
[ --with-xmlrpc[=DIR] Include XMLRPC-EPI support.])
1212

13+
xmlrpc_ext_shared=$ext_shared
14+
1315
PHP_ARG_WITH(expat-dir, libexpat dir for XMLRPC-EPI,
1416
[ --with-expat-dir=DIR XMLRPC-EPI: libexpat dir for XMLRPC-EPI.])
1517

@@ -48,7 +50,7 @@ if test "$PHP_XMLRPC" = "yes"; then
4850
libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
4951
libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
5052
libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
51-
libxmlrpc/xml_to_soap.c,$ext_shared,,
53+
libxmlrpc/xml_to_soap.c,$xmlrpc_ext_shared,,
5254
-I@ext_srcdir@/libxmlrpc -DVERSION="0.50")
5355
PHP_ADD_BUILD_DIR($ext_builddir/libxmlrpc)
5456
XMLRPC_MODULE_TYPE=builtin

ext/rpc/xmlrpc/xmlrpc-epi-php.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ PHP_FUNCTION(xmlrpc_decode)
776776
zval* retval = decode_request_worker(arg1, arg2, NULL);
777777
if(retval) {
778778
*return_value = *retval;
779-
zval_copy_ctor(return_value);
779+
FREE_ZVAL(retval);
780780
}
781781
}
782782
}

ext/xmlrpc/config.m4

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ sinclude(libxmlrpc/xmlrpc.m4)
1010
PHP_ARG_WITH(xmlrpc, for XMLRPC-EPI support,
1111
[ --with-xmlrpc[=DIR] Include XMLRPC-EPI support.])
1212

13+
xmlrpc_ext_shared=$ext_shared
14+
1315
PHP_ARG_WITH(expat-dir, libexpat dir for XMLRPC-EPI,
1416
[ --with-expat-dir=DIR XMLRPC-EPI: libexpat dir for XMLRPC-EPI.])
1517

@@ -48,7 +50,7 @@ if test "$PHP_XMLRPC" = "yes"; then
4850
libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
4951
libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
5052
libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
51-
libxmlrpc/xml_to_soap.c,$ext_shared,,
53+
libxmlrpc/xml_to_soap.c,$xmlrpc_ext_shared,,
5254
-I@ext_srcdir@/libxmlrpc -DVERSION="0.50")
5355
PHP_ADD_BUILD_DIR($ext_builddir/libxmlrpc)
5456
XMLRPC_MODULE_TYPE=builtin

ext/xmlrpc/xmlrpc-epi-php.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ PHP_FUNCTION(xmlrpc_decode)
776776
zval* retval = decode_request_worker(arg1, arg2, NULL);
777777
if(retval) {
778778
*return_value = *retval;
779-
zval_copy_ctor(return_value);
779+
FREE_ZVAL(retval);
780780
}
781781
}
782782
}

0 commit comments

Comments
 (0)