Skip to content

Commit

Permalink
- Addressing minor leak noticed while addressing bug #48590
Browse files Browse the repository at this point in the history
  • Loading branch information
Sriram Natarajan committed Jan 5, 2010
1 parent 18946d2 commit 9a1251e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ext/soap/php_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,9 +764,9 @@ int make_http_soap_request(zval *this_ptr,
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);
Expand All @@ -778,8 +778,6 @@ int make_http_soap_request(zval *this_ptr,
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);
Expand Down Expand Up @@ -1034,8 +1032,8 @@ int make_http_soap_request(zval *this_ptr,
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;
}

Expand Down

0 comments on commit 9a1251e

Please sign in to comment.