Fix memory leak
This commit is contained in:
@@ -665,11 +665,13 @@ int FDSLoad(const char *name, FCEUFILE *fp) {
|
|||||||
if (FDSBIOS)
|
if (FDSBIOS)
|
||||||
free(FDSBIOS);
|
free(FDSBIOS);
|
||||||
FDSBIOS = NULL;
|
FDSBIOS = NULL;
|
||||||
|
free(zp->fp->data);
|
||||||
FCEU_fclose(zp);
|
FCEU_fclose(zp);
|
||||||
FCEU_PrintError("Error reading FDS BIOS ROM image.\n");
|
FCEU_PrintError("Error reading FDS BIOS ROM image.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(zp->fp->data);
|
||||||
FCEU_fclose(zp);
|
FCEU_fclose(zp);
|
||||||
|
|
||||||
FCEU_fseek(fp, 0, SEEK_SET);
|
FCEU_fseek(fp, 0, SEEK_SET);
|
||||||
|
|||||||
Reference in New Issue
Block a user