Merge pull request #177 from moshekaplan/patch-6

Fix Ztable memory leaks
This commit is contained in:
Pseudonym 2014-07-31 12:58:13 +01:00
commit 9c77b2dfeb
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;