must make sure *gzfile gets nulled on error

This commit is contained in:
Bill Currie 2001-08-21 02:44:45 +00:00
parent d430cdcbff
commit 9c43a43bb3

View file

@ -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 // make sure they're not trying to do wierd stuff with our private files
if (contains_updir(filename)) { if (contains_updir(filename)) {
Con_Printf ("FindFile: %s: attempt to escape directory tree!\n", 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); Con_DPrintf ("FindFile: can't find %s\n", filename);
error:
*gzfile = NULL; *gzfile = NULL;
com_filesize = -1; com_filesize = -1;
return -1; return -1;