Fix duplicate deletion of host devices

Since host devices are also included in the deviceList_, they are already
being deleted. Deleting them again causes a segfault.
This commit is contained in:
Srivats P 2019-08-18 12:30:41 +05:30
parent 46dd028a33
commit 635ca18bce

View File

@ -103,14 +103,12 @@ void DeviceManager::createHostDevices(void)
DeviceManager::~DeviceManager()
{
// Delete *all* devices - host and enumerated
foreach(Device *dev, deviceList_)
delete dev;
foreach(OstProto::DeviceGroup *devGrp, deviceGroupList_)
delete devGrp;
foreach(Device *dev, hostDeviceList_)
delete dev;
}
int DeviceManager::deviceGroupCount()