mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed memory leak in RsRecogn::createTagRequest
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8453 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c187c03758
commit
b61355e894
@ -565,8 +565,6 @@ RsGxsRecognTagItem *RsRecogn::extractTag(const std::string &encoded)
|
||||
|
||||
bool RsRecogn::createTagRequest(const RsTlvSecurityKey &key, const RsGxsId &id, const std::string &nickname, uint16_t tag_class, uint16_t tag_type, const std::string &comment, std::string &tag)
|
||||
{
|
||||
RsGxsRecognReqItem *item = new RsGxsRecognReqItem();
|
||||
|
||||
EVP_PKEY *signKey = EVP_PKEY_new();
|
||||
RSA *rsakey = d2i_RSAPrivateKey(NULL, (const unsigned char **)&key.keyData.bin_data, key.keyData.bin_len);
|
||||
|
||||
@ -588,6 +586,8 @@ bool RsRecogn::createTagRequest(const RsTlvSecurityKey &key, const RsGxsId &id,
|
||||
return false;
|
||||
}
|
||||
|
||||
RsGxsRecognReqItem *item = new RsGxsRecognReqItem();
|
||||
|
||||
item->issued_at = time(NULL);
|
||||
item->period = 365 * 24 * 3600;
|
||||
item->tag_class = tag_class;
|
||||
|
Loading…
Reference in New Issue
Block a user