From: Derick Rethans Date: Fri, 29 Nov 2002 15:57:39 +0000 (+0000) Subject: - Fix memleak (patch by Oleg.Roitburd@lycos-europe.com) X-Git-Tag: php-4.3.0RC3~109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d90cd59dc7a45019433d5fe618788b187738d05;p=php - Fix memleak (patch by Oleg.Roitburd@lycos-europe.com) #- I don't merge this to HEAD right away, as my current development tree # has a lot of modifications, of course I did this change there too. --- diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index d750ea53be..c242d08305 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -1463,6 +1463,7 @@ PHP_FUNCTION(mcrypt_create_iv) n = read_bytes; close(fd); if (n < size) { + efree(iv); php_error(E_WARNING, "%s(): Could not gather sufficient random data", get_active_function_name(TSRMLS_C)); RETURN_FALSE; }