From: Sterling Hughes Date: Thu, 26 Dec 2002 20:52:42 +0000 (+0000) Subject: if needle is empty free allocated memory X-Git-Tag: PHP_5_0_dev_before_13561_fix~605 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=457f22c19823aea93f95cd0be0d17667ba741dda;p=php if needle is empty free allocated memory --- diff --git a/ext/standard/string.c b/ext/standard/string.c index f450e2a720..d5defdc253 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1352,6 +1352,9 @@ PHP_FUNCTION(stristr) if (Z_TYPE_PP(needle) == IS_STRING) { if (!Z_STRLEN_PP(needle)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter."); + efree(haystack_orig); + zval_ptr_dtor(haystack); + zval_ptr_dtor(needle); RETURN_FALSE; }