diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp index ebc40a03d..4a353efb4 100644 --- a/src/modules/partition/core/DeviceList.cpp +++ b/src/modules/partition/core/DeviceList.cpp @@ -98,8 +98,7 @@ erase(DeviceList& l, DeviceList::iterator& it) { Device* p = *it; auto r = l.erase( it ); - if (p) - delete p; + delete p; return r; }