Properly free data structures.

This commit is contained in:
Andy McFadden 2003-02-09 01:54:46 +00:00
parent 1169554de3
commit 05ffc32db0

View File

@ -454,8 +454,7 @@ bail:
if (pMasterHeader != nil) if (pMasterHeader != nil)
free(pMasterHeader); free(pMasterHeader);
if (pArchiveData != nil) ArchiveData_Free(pArchiveData);
free(pArchiveData);
return err; return err;
} }
@ -469,7 +468,7 @@ main(int argc, char** argv)
{ {
long major, minor, bug; long major, minor, bug;
const char* pBuildDate; const char* pBuildDate;
FILE* infp; FILE* infp = nil;
int cc; int cc;
(void) NuGetVersion(&major, &minor, &bug, &pBuildDate, nil); (void) NuGetVersion(&major, &minor, &bug, &pBuildDate, nil);
@ -489,6 +488,9 @@ main(int argc, char** argv)
cc = DoFileStuff(argv[1]); cc = DoFileStuff(argv[1]);
if (infp != nil)
fclose(infp);
exit(cc != 0); exit(cc != 0);
} }