From 5cdc02daefa5c62ec77a607b204b341d01b40f19 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 3 Feb 2010 20:29:09 +0000 Subject: [PATCH] - Don't free soap_headers just before comparing the length. This causes SoapClient.. --- ext/soap/php_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 23432f511d..6257e79151 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -759,7 +759,6 @@ 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);} php_stream_close(stream); @@ -770,6 +769,7 @@ try_again: 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); -- 2.50.1