cvs: php4 /main streams.c

From: Date: Tue, 20 Aug 2002 22:08:55 +0000
Subject: cvs: php4 /main streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13504@lists.php.net to get a copy of this message
wez Tue Aug 20 18:08:55 2002 EDT Modified files: /php4/main streams.c Log: Fix newly introduced leak in the debug build. Index: php4/main/streams.c diff -u php4/main/streams.c:1.64 php4/main/streams.c:1.65 --- php4/main/streams.c:1.64 Tue Aug 20 16:47:47 2002 +++ php4/main/streams.c Tue Aug 20 18:08:55 2002 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.64 2002/08/20 20:47:47 wez Exp $ */ +/* $Id: streams.c,v 1.65 2002/08/20 22:08:55 wez Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -163,15 +163,21 @@ * of stream it was. */ char leakbuf[512]; snprintf(leakbuf, sizeof(leakbuf), __FILE__ "(%d) : Stream of type '%s' 0x%08X (path:%s) was not closed\n", __LINE__, stream->ops->label, (unsigned int)stream, stream->__orig_path); + + STR_FREE(stream->__orig_path); + # if defined(PHP_WIN32) OutputDebugString(leakbuf); # else fprintf(stderr, leakbuf); # endif + } else { + STR_FREE(stream->__orig_path); + pefree(stream, stream->is_persistent); } - else -#endif +#else pefree(stream, stream->is_persistent); +#endif } return ret;

« previous php.cvs (#13504) next »