diff --git a/source/loader/frag.c b/source/loader/frag.c index 2e137f9b..63dc6803 100644 --- a/source/loader/frag.c +++ b/source/loader/frag.c @@ -274,6 +274,11 @@ int get_frag_list(u8 *id, char *path, const u32 hdd_sector_size) ret_val = 0; out: + if(ret_val && frag_list != NULL) + { + MEM1_free(frag_list); + frag_list = NULL; + } if(fs != NULL) { MEM2_free(fs);