Fixed memory leak

This commit is contained in:
Uwe Seimet 2022-02-18 19:24:49 +01:00
parent 5101b7849a
commit 2dbbdcd192

View File

@ -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");