com php-src: Fixed memory leak of strripos() when empty needle or haystack: ext/standard/string.c

From: Date: Fri, 23 Jan 2015 08:53:58 +0000
Subject: com php-src: Fixed memory leak of strripos() when empty needle or haystack: ext/standard/string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84342@lists.php.net to get a copy of this message
Commit: d44b6e58ba1c1cae6758159abe9b0b78e2ec09c0 Author: Reeze Xia <reeze@php.net> Fri, 23 Jan 2015 16:53:58 +0800 Parents: 061c0ed9eeee517bcf3a9643b1594bee8c03c7ea Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d44b6e58ba1c1cae6758159abe9b0b78e2ec09c0 Log: Fixed memory leak of strripos() when empty needle or haystack Changed paths: M ext/standard/string.c Diff: diff --git a/ext/standard/string.c b/ext/standard/string.c index dc69a8a..4f0a6ec 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2121,6 +2121,7 @@ PHP_FUNCTION(strripos) } if ((haystack->len == 0) || (needle->len == 0)) { + STR_ALLOCA_FREE(ord_needle, use_heap); RETURN_FALSE; }

« previous php.cvs (#84342) next »