From 9c43a43bb398ed4f6c944b6cea3f886e7ff8ad5d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 21 Aug 2001 02:44:45 +0000 Subject: [PATCH] must make sure *gzfile gets nulled on error --- libs/util/quakefs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/util/quakefs.c b/libs/util/quakefs.c index 4c1b424a0..af92bd68d 100644 --- a/libs/util/quakefs.c +++ b/libs/util/quakefs.c @@ -592,7 +592,7 @@ _COM_FOpenFile (const char *filename, VFile **gzfile, char *foundname, int zip) // make sure they're not trying to do wierd stuff with our private files if (contains_updir(filename)) { Con_Printf ("FindFile: %s: attempt to escape directory tree!\n", filename); - return -1; + goto error; } // @@ -648,7 +648,7 @@ _COM_FOpenFile (const char *filename, VFile **gzfile, char *foundname, int zip) } Con_DPrintf ("FindFile: can't find %s\n", filename); - +error: *gzfile = NULL; com_filesize = -1; return -1;