cvs: php4(PHP_4_0_5) /ext/mcrypt mcrypt.c
| From: | Derick Rethans | Date: | Sat, 17 Mar 2001 14:55:24 +0000 |
| Subject: | cvs: php4(PHP_4_0_5) /ext/mcrypt mcrypt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4625@lists.php.net to get a copy of this message | ||
derick Sat Mar 17 06:55:24 2001 EDT
Modified files: (Branch: PHP_4_0_5)
/php4/ext/mcrypt mcrypt.c
Log:
- MFH (memleak fix)
Index: php4/ext/mcrypt/mcrypt.c
diff -u php4/ext/mcrypt/mcrypt.c:1.45 php4/ext/mcrypt/mcrypt.c:1.45.2.1
--- php4/ext/mcrypt/mcrypt.c:1.45 Sun Feb 25 22:07:02 2001
+++ php4/ext/mcrypt/mcrypt.c Sat Mar 17 06:55:24 2001
@@ -1211,7 +1211,7 @@
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();
@@ -1309,6 +1309,8 @@
mcrypt_generic_end (td);
if (iv_s != NULL)
efree (iv_s);
+ if (key_s != NULL)
+ efree (key_s);
efree (data_s);
mcrypt_module_close (td);
}