]> granicus.if.org Git - php/commitdiff
Fixed bug #34766 (possible crash on HTTP redirection)
authorDmitry Stogov <dmitry@php.net>
Fri, 7 Oct 2005 11:56:19 +0000 (11:56 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 7 Oct 2005 11:56:19 +0000 (11:56 +0000)
ext/soap/php_http.c

index 6da386f7dd16351d587be87f1d4c00cc0fd07d68..8c3b92b1949a702c794cdd6e2c6a653038481201 100644 (file)
@@ -836,6 +836,7 @@ try_again:
                php_stream_close(stream);
                zend_hash_del(Z_OBJPROP_P(this_ptr), "httpsocket", sizeof("httpsocket"));
                zend_hash_del(Z_OBJPROP_P(this_ptr), "_use_proxy", sizeof("_use_proxy"));
+               stream = NULL;
        }
 
        /* Process HTTP status codes */
@@ -848,13 +849,6 @@ try_again:
                        int body_size;
 
                        if (new_url != NULL) {
-                               if (get_http_body(stream, !http_1_1, http_headers, &body, &body_size TSRMLS_CC)) {
-                                       efree(body);
-                               } else {
-                                       php_stream_close(stream);
-                                       zend_hash_del(Z_OBJPROP_P(this_ptr), "httpsocket", sizeof("httpsocket"));
-                                       stream = NULL;
-                               }
                                efree(http_headers);
                                efree(http_body);
                                efree(loc);