From 6a0a1349a8c02884e096641fb56e6785e609abeb Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 25 Mar 2002 08:11:55 +0000 Subject: [PATCH] Fixed a crashbug when opening a file that doesn't exist. --- archivers/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/archivers/dir.c b/archivers/dir.c index 69dd7752..81962c71 100644 --- a/archivers/dir.c +++ b/archivers/dir.c @@ -244,7 +244,6 @@ static FileHandle *doOpen(DirHandle *h, const char *name, char *f = __PHYSFS_platformCvtToDependent((char *)(h->opaque), name, NULL); void *rc; FileHandle *retval; - char *str; BAIL_IF_MACRO(f == NULL, NULL, NULL); @@ -261,7 +260,7 @@ static FileHandle *doOpen(DirHandle *h, const char *name, if (!rc) { free(retval); - BAIL_MACRO(str, NULL); + return(NULL); } /* if */ retval->opaque = (void *) rc;