Skip to content

Commit 1709009

Browse files
committed
Don't free soap_headers just before comparing the length. This causes SoapClient to fail when requesting a URL
1 parent 218eba3 commit 1709009

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
@@ -759,7 +759,6 @@ int make_http_soap_request(zval *this_ptr,
759759
smart_str_0(&soap_headers);
760760

761761
err = php_stream_write(stream, soap_headers.c, soap_headers.len);
762-
smart_str_free(&soap_headers);
763762
if (err != soap_headers.len) {
764763
if (request != buf) {efree(request);}
765764
php_stream_close(stream);
@@ -770,6 +769,7 @@ int make_http_soap_request(zval *this_ptr,
770769
smart_str_free(&soap_headers_z);
771770
return FALSE;
772771
}
772+
smart_str_free(&soap_headers);
773773
} else {
774774
add_soap_fault(this_ptr, "HTTP", "Failed to create stream??", NULL, NULL TSRMLS_CC);
775775
smart_str_free(&soap_headers_z);

0 commit comments

Comments
 (0)