summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mcrypt/mcrypt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index 7539d9e53f..66382aeb7c 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -1310,6 +1310,7 @@ static void php_mcrypt_do_crypt(char* cipher, const char *key, int key_len, cons
}
if (mcrypt_generic_init(td, (void *) key, key_len, (void *) iv) < 0) {
+ efree(data_s);
php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Mcrypt initialisation failed");
mcrypt_module_close(td);
RETURN_FALSE;