mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
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.
This commit is contained in:
parent
dc23a076be
commit
9d0554e4a6
@ -68,6 +68,9 @@ unsigned char GetCPUImplementer()
|
|||||||
sscanf(implementer_string, "0x%02hhx", &implementer);
|
sscanf(implementer_string, "0x%02hhx", &implementer);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(implementer_string);
|
||||||
|
|
||||||
return implementer;
|
return implementer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,6 +95,9 @@ unsigned short GetCPUPart()
|
|||||||
sscanf(part_string, "0x%03hx", &part);
|
sscanf(part_string, "0x%03hx", &part);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(part_string);
|
||||||
|
|
||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user