summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2002-12-27 03:22:42 +0000
committerSterling Hughes <sterling@php.net>2002-12-27 03:22:42 +0000
commitd8b14bd700620783f3f261dfd35580dd38e16c11 (patch)
tree94645a1b8c22d826aa7355d1cb89df6d3a71d7a0
parent4e395f36af413892461f08cda098e14c34c22456 (diff)
downloadphp-git-d8b14bd700620783f3f261dfd35580dd38e16c11.tar.gz
mfh
-rw-r--r--ext/standard/string.c5
1 files changed, 5 insertions, 0 deletions
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);
}
/* }}} */