Skip to content

Commit d8b14bd

Browse files
author
Sterling Hughes
committed
mfh
1 parent 4e395f3 commit d8b14bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/standard/string.c

+5
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,9 @@ PHP_FUNCTION(stristr)
13521352
if (Z_TYPE_PP(needle) == IS_STRING) {
13531353
if (!Z_STRLEN_PP(needle)) {
13541354
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter.");
1355+
efree(haystack_orig);
1356+
zval_ptr_dtor(haystack);
1357+
zval_ptr_dtor(needle);
13551358
RETURN_FALSE;
13561359
}
13571360

@@ -1372,6 +1375,8 @@ PHP_FUNCTION(stristr)
13721375
RETVAL_FALSE;
13731376
}
13741377

1378+
zval_ptr_dtor(haystack);
1379+
zval_ptr_dtor(needle);
13751380
efree(haystack_orig);
13761381
}
13771382
/* }}} */

0 commit comments

Comments
 (0)