cvs: php4 /ext/standard filestat.c

From: Date: Thu, 27 Jul 2000 13:28:21 +0000
Subject: cvs: php4 /ext/standard filestat.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-949@lists.php.net to get a copy of this message
stas Thu Jul 27 06:28:21 2000 EDT Modified files: /php4/ext/standard filestat.c Log: Fix memory leak in touch when safety check fails Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.41 php4/ext/standard/filestat.c:1.42 --- php4/ext/standard/filestat.c:1.41 Sun Jun 25 10:02:45 2000 +++ php4/ext/standard/filestat.c Thu Jul 27 06:28:21 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.41 2000/06/25 17:02:45 zeev Exp $ */ +/* $Id: filestat.c,v 1.42 2000/07/27 13:28:21 stas Exp $ */ #include "php.h" #include "safe_mode.h" @@ -402,8 +402,10 @@ } /* Check the basedir */ - if (php_check_open_basedir((*filename)->value.str.val)) + if (php_check_open_basedir((*filename)->value.str.val)) { + if (newtime) efree(newtime); RETURN_FALSE; + } /* create the file if it doesn't exist already */ ret = V_STAT((*filename)->value.str.val, &sb);

« previous php.cvs (#949) next »