mirror of
https://github.com/fadden/nulib2.git
synced 2024-12-28 09:29:16 +00:00
Properly free data structures.
This commit is contained in:
parent
1169554de3
commit
05ffc32db0
@ -454,8 +454,7 @@ bail:
|
||||
if (pMasterHeader != nil)
|
||||
free(pMasterHeader);
|
||||
|
||||
if (pArchiveData != nil)
|
||||
free(pArchiveData);
|
||||
ArchiveData_Free(pArchiveData);
|
||||
|
||||
return err;
|
||||
}
|
||||
@ -469,7 +468,7 @@ main(int argc, char** argv)
|
||||
{
|
||||
long major, minor, bug;
|
||||
const char* pBuildDate;
|
||||
FILE* infp;
|
||||
FILE* infp = nil;
|
||||
int cc;
|
||||
|
||||
(void) NuGetVersion(&major, &minor, &bug, &pBuildDate, nil);
|
||||
@ -489,6 +488,9 @@ main(int argc, char** argv)
|
||||
|
||||
cc = DoFileStuff(argv[1]);
|
||||
|
||||
if (infp != nil)
|
||||
fclose(infp);
|
||||
|
||||
exit(cc != 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user