]> granicus.if.org Git - php/commitdiff
mfh
authorSterling Hughes <sterling@php.net>
Fri, 27 Dec 2002 03:22:42 +0000 (03:22 +0000)
committerSterling Hughes <sterling@php.net>
Fri, 27 Dec 2002 03:22:42 +0000 (03:22 +0000)
ext/standard/string.c

index 261e76cc7d52867d1dffa3517107b7d3602320bf..d5defdc253a8af9dfefc368b20a115dc162deec5 100644 (file)
@@ -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);
 }
 /* }}} */