added missing delete when RsDiscReply item is rejected because of service permissions, causing memory leak

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6525 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-07-21 19:20:12 +00:00
parent f5218cdfc3
commit b1bc66b319

View File

@ -165,6 +165,8 @@ int p3disc::handleIncoming()
{ {
if(rsPeers->servicePermissionFlags_sslid(item->PeerId()) & RS_SERVICE_PERM_DISCOVERY) if(rsPeers->servicePermissionFlags_sslid(item->PeerId()) & RS_SERVICE_PERM_DISCOVERY)
recvDiscReply(dri); recvDiscReply(dri);
else
delete item ;
} }
else if (NULL != (dvi = dynamic_cast<RsDiscVersion *> (item))) else if (NULL != (dvi = dynamic_cast<RsDiscVersion *> (item)))
{ {