From: Sterling Hughes Date: Fri, 27 Dec 2002 03:22:42 +0000 (+0000) Subject: mfh X-Git-Tag: php-4.3.0~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d8b14bd700620783f3f261dfd35580dd38e16c11;p=php mfh --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 261e76cc7d..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; } @@ -1372,6 +1375,8 @@ PHP_FUNCTION(stristr) RETVAL_FALSE; } + zval_ptr_dtor(haystack); + zval_ptr_dtor(needle); efree(haystack_orig); } /* }}} */