diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-09-28 23:17:31 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-09-28 23:17:31 +0000 |
commit | 66bdeaddb4f25fd89c43807c28715b7a195c563a (patch) | |
tree | b67d14ce3f7dba3ac963b76dfecc319aa1411bdb | |
parent | d6eb64344d34fb5e3bf2198630485ab8ff35383c (diff) | |
download | php-git-66bdeaddb4f25fd89c43807c28715b7a195c563a.tar.gz |
Fixed a large leak inside _php_image_create_from()
-rw-r--r-- | ext/gd/gd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 33d3c312f8..f42b06fec9 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2406,6 +2406,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, io_ctx = gdNewDynamicCtxEx(buff_size, buff, 0); if (!io_ctx) { + pefree(buff, 1); php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot allocate GD IO context"); goto out_err; } @@ -2420,7 +2421,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, #else io_ctx->free(io_ctx); #endif - + pefree(buff, 1); #endif } else { |