From: Derick Rethans Date: Fri, 16 Mar 2001 15:59:45 +0000 (+0000) Subject: - Fixed mem leak X-Git-Tag: php-4.0.6RC1~676 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9720ac01fce7771d07f3a06cdd3fc571594a834f;p=php - Fixed mem leak --- diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index be50c9e138..c0c290c5b2 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -1211,7 +1211,7 @@ static void php_mcrypt_do_crypt (char* cipher, zval **key, zval **data, char *mo int block_size, max_key_length, use_key_length, i, count, iv_size; unsigned long int data_size; int *key_length_sizes; - char *key_s, *iv_s; + char *key_s = NULL, *iv_s; char *data_s; MCRYPT td; MCLS_FETCH(); @@ -1307,6 +1307,8 @@ static void php_mcrypt_do_crypt (char* cipher, zval **key, zval **data, char *mo /* freeing vars */ mcrypt_generic_end (td); + if (key_s != NULL) + efree (key_s); if (iv_s != NULL) efree (iv_s); efree (data_s);