cvs: php4 /ext/mcrypt mcrypt.c
| From: | Derick Rethans | Date: | Fri, 16 Mar 2001 15:59:46 +0000 |
| Subject: | cvs: php4 /ext/mcrypt mcrypt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4612@lists.php.net to get a copy of this message | ||
derick Fri Mar 16 07:59:46 2001 EDT
Modified files:
/php4/ext/mcrypt mcrypt.c
Log:
- Fixed mem leak
Index: php4/ext/mcrypt/mcrypt.c
diff -u php4/ext/mcrypt/mcrypt.c:1.45 php4/ext/mcrypt/mcrypt.c:1.46
--- php4/ext/mcrypt/mcrypt.c:1.45 Sun Feb 25 22:07:02 2001
+++ php4/ext/mcrypt/mcrypt.c Fri Mar 16 07:59:45 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();
@@ -1307,6 +1307,8 @@
/* freeing vars */
mcrypt_generic_end (td);
+ if (key_s != NULL)
+ efree (key_s);
if (iv_s != NULL)
efree (iv_s);
efree (data_s);