summaryrefslogtreecommitdiff
path: root/ext/xmlrpc/xmlrpc-epi-php.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/xmlrpc/xmlrpc-epi-php.c')
-rw-r--r--ext/xmlrpc/xmlrpc-epi-php.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c
index 82bdd12b8a..737a3f84a5 100644
--- a/ext/xmlrpc/xmlrpc-epi-php.c
+++ b/ext/xmlrpc/xmlrpc-epi-php.c
@@ -695,7 +695,11 @@ PHP_FUNCTION(xmlrpc_encode_request)
outBuf = XMLRPC_REQUEST_ToXML(xRequest, 0);
if (outBuf) {
RETVAL_STRING(outBuf);
+#ifdef HAVE_XMLRPC_BUNDLED
efree(outBuf);
+#else
+ free(outBuf);
+#endif
}
XMLRPC_RequestFree(xRequest, 1);
}
@@ -729,7 +733,11 @@ PHP_FUNCTION(xmlrpc_encode)
if (xOut) {
if (outBuf) {
RETVAL_STRING(outBuf);
+#ifdef HAVE_XMLRPC_BUNDLED
efree(outBuf);
+#else
+ free(outBuf);
+#endif
}
/* cleanup */
XMLRPC_CleanupValue(xOut);
@@ -1092,7 +1100,11 @@ PHP_FUNCTION(xmlrpc_server_call_method)
outBuf = XMLRPC_REQUEST_ToXML(xResponse, &buf_len);
if (outBuf) {
RETVAL_STRINGL(outBuf, buf_len);
+#ifdef HAVE_XMLRPC_BUNDLED
efree(outBuf);
+#else
+ free(outBuf);
+#endif
}
/* cleanup after ourselves. what a sty! */
XMLRPC_RequestFree(xResponse, 0);