[Matahari] [PATCH 1/2] host: Fix memory leak and potential crash.