diff options
author | Derick Rethans <derick@php.net> | 2001-03-16 15:59:45 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2001-03-16 15:59:45 +0000 |
commit | 9720ac01fce7771d07f3a06cdd3fc571594a834f (patch) | |
tree | 97481f0c171250956a655856c97217b9704f4528 /ext/mcrypt/mcrypt.c | |
parent | 8913a7350e28ad050c71442b8ecbdbb6375f3265 (diff) | |
download | php-git-9720ac01fce7771d07f3a06cdd3fc571594a834f.tar.gz |
- Fixed mem leak
Diffstat (limited to 'ext/mcrypt/mcrypt.c')
-rw-r--r-- | ext/mcrypt/mcrypt.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |