cvs: php-src(PHP_4_3) /ext/mcrypt mcrypt.c

From: Date: Tue, 04 Nov 2003 01:32:42 +0000
Subject: cvs: php-src(PHP_4_3) /ext/mcrypt mcrypt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-24415@lists.php.net to get a copy of this message
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 <derick@derickrethans.nl> | +----------------------------------------------------------------------+ */ -/* $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

« previous php.cvs (#24415) next »