fix broken error path

This commit is contained in:
notaz 2017-04-17 00:36:30 +03:00
parent 325ee167fd
commit 01685eefb0

View file

@ -569,7 +569,7 @@ int PicoCartLoad(pm_file *f,unsigned char **prom,unsigned int *psize,int is_sms)
bytes_read = pm_read(rom,size,f); // Load up the rom bytes_read = pm_read(rom,size,f); // Load up the rom
if (bytes_read <= 0) { if (bytes_read <= 0) {
elprintf(EL_STATUS, "read failed"); elprintf(EL_STATUS, "read failed");
free(rom); plat_munmap(rom, rom_alloc_size);
return 3; return 3;
} }