mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #177 from moshekaplan/patch-6
Fix Ztable memory leaks
This commit is contained in:
commit
9c77b2dfeb
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue