From: kub Date: Sat, 3 Jun 2023 07:50:23 +0000 (+0000) Subject: core, fix crash if image couldn't be loaded X-Git-Tag: v2.00~219 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78562415ffec6b3501b7e4472456fb8fd50a753e;p=picodrive.git core, fix crash if image couldn't be loaded --- diff --git a/pico/media.c b/pico/media.c index 27f0c14c..7c147b2f 100644 --- a/pico/media.c +++ b/pico/media.c @@ -395,7 +395,7 @@ out: if (rom_file) pm_close(rom_file); if (rom_data) - free(rom_data); + PicoCartUnload(); return media_type; }