]> granicus.if.org Git - php/commitdiff
MFB. Don't free soap_headers just before comparing the length. This causes SoapClient...
authorFrank M. Kromann <fmk@php.net>
Wed, 13 Jan 2010 07:22:21 +0000 (07:22 +0000)
committerFrank M. Kromann <fmk@php.net>
Wed, 13 Jan 2010 07:22:21 +0000 (07:22 +0000)
ext/soap/php_http.c

index 866fa418f58e95dfe413d19613499468386cd3db..440d365caa9422bcf1a590e28195971da6062a8f 100644 (file)
@@ -764,7 +764,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);
@@ -778,6 +777,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);