mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
remove potential use of deleted item in rsRecogn
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8430 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8cb423f20d
commit
d38068c4bc
@ -616,7 +616,6 @@ bool RsRecogn::createTagRequest(const RsTlvSecurityKey &key, const RsGxsId &id,
|
|||||||
uint32_t len = serialiser.size(item);
|
uint32_t len = serialiser.size(item);
|
||||||
char *buf = new char[len];
|
char *buf = new char[len];
|
||||||
bool serOk = serialiser.serialise(item, buf, &len);
|
bool serOk = serialiser.serialise(item, buf, &len);
|
||||||
delete item;
|
|
||||||
|
|
||||||
if (serOk)
|
if (serOk)
|
||||||
{
|
{
|
||||||
@ -632,9 +631,11 @@ bool RsRecogn::createTagRequest(const RsTlvSecurityKey &key, const RsGxsId &id,
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
item->print(std::cerr);
|
item->print(std::cerr);
|
||||||
#endif // DEBUG_RECOGN
|
#endif // DEBUG_RECOGN
|
||||||
|
delete item;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete item;
|
||||||
return serOk;
|
return serOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user