From: Ilia Alshanetsky Date: Sat, 22 Sep 2007 15:26:51 +0000 (+0000) Subject: MFB: Fixed memory leak inside pack() (coverity issues #398,#399,#400) X-Git-Tag: RELEASE_2_0_0a1~1761 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17f9597ba3fee0f5ebe48ab5892f5f20d2eac280;p=php MFB: Fixed memory leak inside pack() (coverity issues #398,#399,#400) --- diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 2ba014dc5c..d6a6e31f61 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -55,6 +55,9 @@ #define INC_OUTPUTPOS(a,b) \ if ((a) < 0 || ((INT_MAX - outputpos)/(b)) < (a)) { \ + efree(argv); \ + efree(formatcodes); \ + efree(formatargs); \ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type %c: integer overflow in format string", code); \ RETURN_FALSE; \ } \