iliaa Thu Oct 30 23:33:52 2003 EDT
Modified files:
/php-src/ext/mcrypt mcrypt.c
Log:
Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called
after every mcrypt_generic_init() call).
# This will be MFHed into 4.3.X tree after release.
Index: php-src/ext/mcrypt/mcrypt.c
diff -u php-src/ext/mcrypt/mcrypt.c:1.87 php-src/ext/mcrypt/mcrypt.c:1.88
--- php-src/ext/mcrypt/mcrypt.c:1.87 Mon Oct 13 05:33:00 2003
+++ php-src/ext/mcrypt/mcrypt.c Thu Oct 30 23:33:51 2003
@@ -16,7 +16,7 @@
| Derick Rethans <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: mcrypt.c,v 1.87 2003/10/13 09:33:00 derick Exp $ */
+/* $Id: mcrypt.c,v 1.88 2003/10/31 04:33:51 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -223,6 +223,7 @@
static void php_mcrypt_module_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
MCRYPT td = (MCRYPT) rsrc->ptr;
+ mcrypt_generic_deinit(td);
mcrypt_module_close (td);
}
@@ -426,6 +427,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