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=4da64aea132e752bfea9448238599653e741b465;hpb=eaa895dc8ff02d63cf52b5d0faf0d8272a96a822 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);