]> granicus.if.org Git - php/commitdiff
MFH: prevent freeing NULL
authorJani Taskinen <jani@php.net>
Thu, 14 May 2009 13:49:50 +0000 (13:49 +0000)
committerJani Taskinen <jani@php.net>
Thu, 14 May 2009 13:49:50 +0000 (13:49 +0000)
ext/standard/http_fopen_wrapper.c

index b2a5b8317cb43ed36c16c829c514285bda9bc2c8..e501c5887af89f93d003ad9c67cedfeefe6a2169 100644 (file)
@@ -394,7 +394,9 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
                                 have_header |= HTTP_HEADER_TYPE;
                        }
                }
-               efree(tmp);
+               if (tmp) {
+                       efree(tmp);
+               }
        }
 
        /* auth header if it was specified */