iliaa Mon Nov 3 20:32:42 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mcrypt mcrypt.c Log: MFH: Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called after every mcrypt_generic_init() call). Index: php-src/ext/mcrypt/mcrypt.c diff -u php-src/ext/mcrypt/mcrypt.c:1.77.4.6 php-src/ext/mcrypt/mcrypt.c:1.77.4.7 --- php-src/ext/mcrypt/mcrypt.c:1.77.4.6 Mon Oct 13 05:30:53 2003 +++ php-src/ext/mcrypt/mcrypt.c Mon Nov 3 20:32:40 2003 @@ -16,7 +16,7 @@ | Derick Rethans <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: mcrypt.c,v 1.77.4.6 2003/10/13 09:30:53 derick Exp $ */ +/* $Id: mcrypt.c,v 1.77.4.7 2003/11/04 01:32:40 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -251,6 +251,7 @@ { #if HAVE_LIBMCRYPT24 MCRYPT td = (MCRYPT) rsrc->ptr; + mcrypt_generic_deinit(td); mcrypt_module_close (td); #endif } @@ -499,6 +500,7 @@ } memcpy (iv_s, Z_STRVAL_PP(iv), iv_size); + mcrypt_generic_deinit(td); result = mcrypt_generic_init (td, key_s, key_size, iv_s); /* If this function fails, close the mcrypt module to prevent crashes
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php