From 60e9696a239afc10465e5725c0d731e8b25ad918 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 26 Jun 2022 21:15:59 +0900 Subject: [PATCH] Toushin3Loader: Fix use-after-free after VM reset --- src/hll/Toushin3Loader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hll/Toushin3Loader.c b/src/hll/Toushin3Loader.c index 9728fc7..d97a232 100644 --- a/src/hll/Toushin3Loader.c +++ b/src/hll/Toushin3Loader.c @@ -201,6 +201,7 @@ static bool Toushin3Loader_UnloadMapInfo(void) if (!ts3m_map_info) return false; free_ts3m_info(ts3m_map_info); + ts3m_map_info = NULL; return true; } @@ -238,6 +239,7 @@ static bool Toushin3Loader_UnloadObjectInfo(void) if (!ts3m_object_info) return false; free_ts3m_info(ts3m_object_info); + ts3m_object_info = NULL; return true; } @@ -278,6 +280,7 @@ static bool Toushin3Loader_UnloadBillboardInfo(void) if (!ts3m_billboard_info) return false; free_ts3m_info(ts3m_billboard_info); + ts3m_billboard_info = NULL; return true; }