From 3d5e32fe21b56d59a116195a66f300735af5a7ec Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 17 Apr 2017 00:36:30 +0300 Subject: [PATCH] fix broken error path --- pico/cart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pico/cart.c b/pico/cart.c index 25a847d4..b35eb533 100644 --- a/pico/cart.c +++ b/pico/cart.c @@ -513,7 +513,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 if (bytes_read <= 0) { elprintf(EL_STATUS, "read failed"); - free(rom); + plat_munmap(rom, rom_alloc_size); return 3; } -- 2.39.5