summaryrefslogtreecommitdiff
path: root/ext/soap
diff options
context:
space:
mode:
authorSriram Natarajan <srinatar@php.net>2010-01-05 19:25:23 +0000
committerSriram Natarajan <srinatar@php.net>2010-01-05 19:25:23 +0000
commit5d0419e05ac57c09ab2578a9f728c6ba366693dc (patch)
tree35296dbaff9aa1d883f50bc2464963cd708109d0 /ext/soap
parentc9a85e3a7e48726a8406bb3829e788bfe8dd3558 (diff)
downloadphp-git-5d0419e05ac57c09ab2578a9f728c6ba366693dc.tar.gz
- Addressing minor leak noticed while addressing bug #48590
Diffstat (limited to 'ext/soap')
-rw-r--r--ext/soap/php_http.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index f14d2309a7..23432f511d 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -759,18 +759,17 @@ try_again:
smart_str_0(&soap_headers);
err = php_stream_write(stream, soap_headers.c, soap_headers.len);
+ smart_str_free(&soap_headers);
if (err != soap_headers.len) {
if (request != buf) {efree(request);}
- smart_str_free(&soap_headers);
php_stream_close(stream);
zend_hash_del(Z_OBJPROP_P(this_ptr), "httpurl", sizeof("httpurl"));
zend_hash_del(Z_OBJPROP_P(this_ptr), "httpsocket", sizeof("httpsocket"));
zend_hash_del(Z_OBJPROP_P(this_ptr), "_use_proxy", sizeof("_use_proxy"));
add_soap_fault(this_ptr, "HTTP", "Failed Sending HTTP SOAP request", NULL, NULL TSRMLS_CC);
+ smart_str_free(&soap_headers_z);
return FALSE;
}
- smart_str_free(&soap_headers);
-
} else {
add_soap_fault(this_ptr, "HTTP", "Failed to create stream??", NULL, NULL TSRMLS_CC);
smart_str_free(&soap_headers_z);
@@ -1022,8 +1021,8 @@ try_again:
phpurl = new_url;
if (--redirect_max < 1) {
- smart_str_free(&soap_headers_z);
add_soap_fault(this_ptr, "HTTP", "Redirection limit reached, aborting", NULL, NULL TSRMLS_CC);
+ smart_str_free(&soap_headers_z);
return FALSE;
}