svn: /php/php-src/ branches/PHP_5_2/ext/soap/php_http.c branches/PHP_5_3/ext/soap/php_http.c trunk/ext/soap/php_http.c

From: Date: Tue, 05 Jan 2010 19:25:23 +0000
Subject: svn: /php/php-src/ branches/PHP_5_2/ext/soap/php_http.c branches/PHP_5_3/ext/soap/php_http.c trunk/ext/soap/php_http.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-61480@lists.php.net to get a copy of this message
srinatar Tue, 05 Jan 2010 19:25:23 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=293152 Log: - Addressing minor leak noticed while addressing bug #48590 Bug: http://bugs.php.net/48590 (Closed) SOAP Client (redirect loop) Changed paths: U php/php-src/branches/PHP_5_2/ext/soap/php_http.c U php/php-src/branches/PHP_5_3/ext/soap/php_http.c U php/php-src/trunk/ext/soap/php_http.c Modified: php/php-src/branches/PHP_5_2/ext/soap/php_http.c =================================================================== --- php/php-src/branches/PHP_5_2/ext/soap/php_http.c 2010-01-05 17:00:02 UTC (rev 293151) +++ php/php-src/branches/PHP_5_2/ext/soap/php_http.c 2010-01-05 19:25:23 UTC (rev 293152) @@ -709,18 +709,17 @@ 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); @@ -969,8 +968,8 @@ 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; } Modified: php/php-src/branches/PHP_5_3/ext/soap/php_http.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/soap/php_http.c 2010-01-05 17:00:02 UTC (rev 293151) +++ php/php-src/branches/PHP_5_3/ext/soap/php_http.c 2010-01-05 19:25:23 UTC (rev 293152) @@ -759,18 +759,17 @@ 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 @@ 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; } Modified: php/php-src/trunk/ext/soap/php_http.c =================================================================== --- php/php-src/trunk/ext/soap/php_http.c 2010-01-05 17:00:02 UTC (rev 293151) +++ php/php-src/trunk/ext/soap/php_http.c 2010-01-05 19:25:23 UTC (rev 293152) @@ -764,9 +764,9 @@ 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); if (client->url) { php_url_free(client->url); @@ -778,8 +778,6 @@ 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); @@ -1034,8 +1032,8 @@ 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; }

« previous php.cvs (#61480) next »