Handle freeing mallocs in config.c properly
This commit is contained in:
@@ -433,8 +433,11 @@ load_video(void)
|
|||||||
free_p = 1;
|
free_p = 1;
|
||||||
}
|
}
|
||||||
gfxcard[0] = video_get_video_from_internal_name(p);
|
gfxcard[0] = video_get_video_from_internal_name(p);
|
||||||
if (free_p)
|
if (free_p) {
|
||||||
free(p);
|
free(p);
|
||||||
|
p = NULL;
|
||||||
|
free_p = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_8514A)) ||
|
if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_8514A)) ||
|
||||||
@@ -853,6 +856,7 @@ load_storage_controllers(void)
|
|||||||
if (free_p) {
|
if (free_p) {
|
||||||
free(p);
|
free(p);
|
||||||
p = NULL;
|
p = NULL;
|
||||||
|
free_p = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ide_ter_enabled = !!ini_section_get_int(cat, "ide_ter", 0);
|
ide_ter_enabled = !!ini_section_get_int(cat, "ide_ter", 0);
|
||||||
|
Reference in New Issue
Block a user