mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-10 07:10:12 -04:00
fixed some leaking memory issues in loadList() methods, and also increased consistency by not returning non empty list with deleted items inside
This commit is contained in:
parent
48750cdb51
commit
8a41554754
22 changed files with 208 additions and 164 deletions
|
@ -1180,12 +1180,13 @@ bool p3ServiceControl::loadList(std::list<RsItem *>& loadList)
|
|||
{
|
||||
RsServicePermissionItem *item = dynamic_cast<RsServicePermissionItem*>(*it) ;
|
||||
|
||||
if(item == NULL)
|
||||
continue ;
|
||||
|
||||
mServicePermissionMap[item->mServiceId] = *item ;
|
||||
if(item != NULL)
|
||||
mServicePermissionMap[item->mServiceId] = *item ;
|
||||
|
||||
delete *it ;
|
||||
}
|
||||
|
||||
loadList.clear() ;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue