cvs: php4 /ext/standard pack.c
| From: | Dan Kalowsky | Date: | Tue, 13 Aug 2002 21:56:39 +0000 |
| Subject: | cvs: php4 /ext/standard pack.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-13332@lists.php.net to get a copy of this message | ||
kalowsky Tue Aug 13 17:56:39 2002 EDT
Modified files:
/php4/ext/standard pack.c
Log:
Fixes a memory leak which results when an invalid format code is
specified. Patch by Ilia <ilia@prohost.org>
#Someone give him php4 karma :)
Index: php4/ext/standard/pack.c
diff -u php4/ext/standard/pack.c:1.37 php4/ext/standard/pack.c:1.38
--- php4/ext/standard/pack.c:1.37 Thu Feb 28 03:26:46 2002
+++ php4/ext/standard/pack.c Tue Aug 13 17:56:39 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.38 2002/08/13 21:56:39 kalowsky 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;
}