diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-07-22 20:55:54 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-07-22 20:55:54 +0400 |
commit | 9583a14e7586a78b3756996e67c9590989a691f2 (patch) | |
tree | 4ffa65690e2dde309b0a25131da4458d7e2e29a9 | |
parent | ca273c31dd893f8f2520b82c7359dac8424cd67d (diff) | |
download | php-git-9583a14e7586a78b3756996e67c9590989a691f2.tar.gz |
Fixed potential memory leaks
-rwxr-xr-x | ext/openssl/openssl.c | 3 | ||||
-rw-r--r-- | ext/standard/type.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index b0b23fe5d7..cd8a156e20 100755 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -4867,7 +4867,8 @@ PHP_FUNCTION(openssl_seal) zval_dtor(*ivec); if (ivlen) { iv[ivlen] = '\0'; - ZVAL_STRINGL(*ivec, erealloc(iv, ivlen + 1), ivlen); + ZVAL_STRINGL(*ivec, iv, ivlen); + efree(iv); } else { ZVAL_EMPTY_STRING(*ivec); } diff --git a/ext/standard/type.c b/ext/standard/type.c index d72a17dafc..2a2988dee5 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -67,6 +67,7 @@ PHP_FUNCTION(gettype) res_len = sizeof("object of type ")-1 + Z_OBJCE_P(arg)->name_length; spprintf(&result, 0, "object of type %s", Z_OBJCE_P(arg)->name); RETVAL_STRINGL(result, res_len); + efree(result); } */ break; |