mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #167 from moshekaplan/patch-5
Avoid leaking `iso` structures
This commit is contained in:
commit
34010c5605
|
@ -549,6 +549,7 @@ isoFile *isoOpen(const char *filename)
|
|||
if (iso->handle == NULL)
|
||||
{
|
||||
printf("Error loading %s\n", iso->filename);
|
||||
free(iso);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -622,6 +623,7 @@ isoFile *isoCreate(const char *filename, int flags)
|
|||
iso->htable = _openfile(Zfile, O_WRONLY);
|
||||
if (iso->htable == NULL)
|
||||
{
|
||||
free(iso);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
@ -630,6 +632,7 @@ isoFile *isoCreate(const char *filename, int flags)
|
|||
if (iso->handle == NULL)
|
||||
{
|
||||
printf("Error loading %s\n", iso->filename);
|
||||
free(iso);
|
||||
return NULL;
|
||||
}
|
||||
printf("isoCreate: %s ok\n", iso->filename);
|
||||
|
@ -1050,4 +1053,3 @@ void isoClose(isoFile *iso)
|
|||
|
||||
free(iso);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue