From 01685eefb022ab2d13cc154a43807e9d20c77c03 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 bb452c0b..d091d623 100644 --- a/pico/cart.c +++ b/pico/cart.c @@ -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 if (bytes_read <= 0) { elprintf(EL_STATUS, "read failed"); - free(rom); + plat_munmap(rom, rom_alloc_size); return 3; } -- 2.39.5