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:
parent
46dd028a33
commit
635ca18bce
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user