]> granicus.if.org Git - php/commitdiff
- Fix memleak (patch by Oleg.Roitburd@lycos-europe.com)
authorDerick Rethans <derick@php.net>
Fri, 29 Nov 2002 15:57:39 +0000 (15:57 +0000)
committerDerick Rethans <derick@php.net>
Fri, 29 Nov 2002 15:57:39 +0000 (15:57 +0000)
#- 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.

ext/mcrypt/mcrypt.c

index d750ea53be6a9bed657af806dfdd7902a1ae0212..c242d08305fa24950110735f8d68aecd5fc59213 100644 (file)
@@ -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;
                }