cvs: php4(PHP_4_2_0) /ext/standard pack.c

From: Date: Sat, 17 Aug 2002 16:47:54 +0000
Subject: cvs: php4(PHP_4_2_0) /ext/standard pack.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13441@lists.php.net to get a copy of this message
iliaa Sat Aug 17 12:47:54 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/standard pack.c Log: Backported memory leak fixes from the 4.3 branch Index: php4/ext/standard/pack.c diff -u php4/ext/standard/pack.c:1.37 php4/ext/standard/pack.c:1.37.2.1 --- php4/ext/standard/pack.c:1.37 Thu Feb 28 03:26:46 2002 +++ php4/ext/standard/pack.c Sat Aug 17 12:47:54 2002 @@ -15,7 +15,7 @@ | Author: Chris Schneider <cschneid@relog.ch> | +----------------------------------------------------------------------+ */ -/* $Id: pack.c,v 1.37 2002/02/28 08:26:46 sebastian Exp $ */ +/* $Id: pack.c,v 1.37.2.1 2002/08/17 16:47:54 iliaa Exp $ */ #include "php.h" @@ -209,6 +209,9 @@ break; default: + efree(argv); + efree(formatcodes); + efree(formatargs); php_error(E_WARNING, "pack type %c: unknown format code", code); RETURN_FALSE; } @@ -518,7 +521,7 @@ inputpos = 0; if (array_init(return_value) == FAILURE) - return; + RETURN_FALSE; while (formatlen-- > 0) { char type = *(format++); @@ -809,6 +812,7 @@ break; } else { php_error(E_WARNING, "pack type %c: not enough input, need %d, have %d", type, size, inputlen - inputpos); + zval_dtor(return_value); RETURN_FALSE; } }

« previous php.cvs (#13441) next »