From: Jani Taskinen Date: Thu, 14 May 2009 13:49:50 +0000 (+0000) Subject: MFH: prevent freeing NULL X-Git-Tag: php-5.2.10RC1~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2cce527199c3272165b3439bd09b00f06ee3f8c7;p=php MFH: prevent freeing NULL --- diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index b2a5b8317c..e501c5887a 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -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 */