Fix Ztable memory leaks

This commit is contained in:
Moshe Kaplan 2014-07-30 22:09:25 -04:00
parent e726f82344
commit af58734826
1 changed files with 6 additions and 1 deletions

View File

@ -323,6 +323,7 @@ int _isoReadZ2table(isoFile *iso)
if (iso->Ztable == NULL)
{
free(Ztable);
return -1;
}
@ -367,7 +368,11 @@ int _isoReadBZ2table(isoFile *iso)
_closefile(handle);
iso->Ztable = (char*)malloc(iso->blocks * 8);
if (iso->Ztable == NULL) return -1;
if (iso->Ztable == NULL){
free(Ztable);
return -1;
}
ofs = 16;