Skip to content

Commit c4633e7

Browse files
committed
MFB. Don't free soap_headers just before comparing the length. This causes SoapClient to fail when requesting a URL
1 parent 4ad43ef commit c4633e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/soap/php_http.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,6 @@ int make_http_soap_request(zval *this_ptr,
764764
smart_str_0(&soap_headers);
765765

766766
err = php_stream_write(stream, soap_headers.c, soap_headers.len);
767-
smart_str_free(&soap_headers);
768767
if (err != soap_headers.len) {
769768
if (request != buf) {efree(request);}
770769
php_stream_close(stream);
@@ -778,6 +777,7 @@ int make_http_soap_request(zval *this_ptr,
778777
smart_str_free(&soap_headers_z);
779778
return FALSE;
780779
}
780+
smart_str_free(&soap_headers);
781781
} else {
782782
add_soap_fault(this_ptr, "HTTP", "Failed to create stream??", NULL, NULL TSRMLS_CC);
783783
smart_str_free(&soap_headers_z);

0 commit comments

Comments
 (0)