From d8b14bd700620783f3f261dfd35580dd38e16c11 Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Fri, 27 Dec 2002 03:22:42 +0000 Subject: [PATCH] mfh --- ext/standard/string.c | 5 +++++ 1 file changed, 5 insertions(+) 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); } /* }}} */ -- 2.50.1