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:
csoler 2015-06-14 09:28:53 +00:00
parent 8cb423f20d
commit d38068c4bc

View File

@ -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
return false; delete item;
} return false;
}
delete item;
return serOk; return serOk;
} }