mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-21 08:29:59 +00:00
Fixed memory leak
This commit is contained in:
parent
5101b7849a
commit
2dbbdcd192
@ -545,8 +545,12 @@ void DetachAll()
|
||||
{
|
||||
Device *map[devices.size()];
|
||||
for (size_t i = 0; i < devices.size(); i++) {
|
||||
Device *device = map[i];
|
||||
if (device) {
|
||||
delete device;
|
||||
map[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (MapController(map)) {
|
||||
LOGINFO("Detached all devices");
|
||||
|
Loading…
Reference in New Issue
Block a user