From 9d0554e4a68b7bfd59ed35107d067514638b93ed Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 6 Aug 2013 18:17:54 -0400 Subject: [PATCH] Free two memory leaks in ArmCPUDetect.cpp Char pointers aren't freed after use. Fixed this in PPSSPP a few days ago. Forgot to check here for the same thing until now. --- Source/Core/Common/Src/ArmCPUDetect.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/Common/Src/ArmCPUDetect.cpp b/Source/Core/Common/Src/ArmCPUDetect.cpp index a04c88834f..ef49d6efb1 100644 --- a/Source/Core/Common/Src/ArmCPUDetect.cpp +++ b/Source/Core/Common/Src/ArmCPUDetect.cpp @@ -68,6 +68,9 @@ unsigned char GetCPUImplementer() sscanf(implementer_string, "0x%02hhx", &implementer); break; } + + free(implementer_string); + return implementer; } @@ -92,6 +95,9 @@ unsigned short GetCPUPart() sscanf(part_string, "0x%03hx", &part); break; } + + free(part_string); + return part; }