diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 2074bf28ec3..948d736b48d 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -407,7 +407,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 */