X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fppf.c;h=edebdd03768638be3d2fe15a3f179347349d87cb;hp=0d80107b5cc50b97bcfe19c5b6b0d686384e10e1;hb=eed148b7fcde73477379388da58d12cd379a6a81;hpb=0c1151feca09186ec61485436912a3e563c40b54 diff --git a/libpcsxcore/ppf.c b/libpcsxcore/ppf.c index 0d80107b..edebdd03 100644 --- a/libpcsxcore/ppf.c +++ b/libpcsxcore/ppf.c @@ -347,8 +347,10 @@ int LoadSBI(const char *fname, int sector_count) { return -1; sbi_sectors = calloc(1, sector_count / 8); - if (sbi_sectors == NULL) + if (sbi_sectors == NULL) { + fclose(sbihandle); return -1; + } // 4-byte SBI header fread(buffer, 1, 4, sbihandle);