lbarnaud Sun Sep 14 14:55:50 2008 UTC Modified files: /php-src/ext/standard file.c Log: Fix leak in fgetc() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.528&r2=1.529&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.528 php-src/ext/standard/file.c:1.529 --- php-src/ext/standard/file.c:1.528 Fri Sep 12 10:30:18 2008 +++ php-src/ext/standard/file.c Sun Sep 14 14:55:50 2008 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.528 2008/09/12 10:30:18 tony2001 Exp $ */ +/* $Id: file.c,v 1.529 2008/09/14 14:55:50 lbarnaud Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1185,6 +1185,9 @@ UChar *buf = php_stream_read_unicode_chars(stream, &buflen); if (!buf || !buflen) { + if (buf) { + efree(buf); + } RETURN_FALSE; } RETURN_UNICODEL(buf, buflen, 0);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php