summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-10-08 19:07:35 +0200
committerAnatol Belski <ab@php.net>2016-10-08 19:07:35 +0200
commit3c5742ebd735d03468048edbca434769dffec8f4 (patch)
tree7fd8dbf89fc8cd981d0987b60e6196772ab55036
parentb061fa909de77085d3822a89ab901b934d0362c4 (diff)
downloadphp-git-3c5742ebd735d03468048edbca434769dffec8f4.tar.gz
fix leak
-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;