mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 00:25:48 -04:00
thunders patch, mem leak, and ignored return vals
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3350 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
cf75bee791
commit
9ff6849a55
2 changed files with 21 additions and 5 deletions
|
@ -1470,7 +1470,6 @@ bool p3GroupDistrib::loadList(std::list<RsItem *> load)
|
|||
/* for child config data */
|
||||
std::list<RsItem* > childLoadL;
|
||||
RsSerialType* childSer = createSerialiser();
|
||||
uint32_t pktSize;
|
||||
|
||||
for(lit = load.begin(); lit != load.end(); lit++)
|
||||
{
|
||||
|
@ -2205,7 +2204,9 @@ std::string p3GroupDistrib::publishMsg(RsDistribMsg *msg, bool personalSign)
|
|||
|
||||
delete[] data;
|
||||
}else{
|
||||
|
||||
delete[] data;
|
||||
delete signedMsg;
|
||||
delete serialType;
|
||||
return msgId;
|
||||
}
|
||||
|
||||
|
@ -2233,6 +2234,8 @@ std::string p3GroupDistrib::publishMsg(RsDistribMsg *msg, bool personalSign)
|
|||
signedMsg->publishSignature.signData.setBinData(sigbuf, siglen);
|
||||
signedMsg->publishSignature.keyId = gi->publishKeyId;
|
||||
|
||||
bool ok = true;
|
||||
|
||||
if (personalSign)
|
||||
{
|
||||
unsigned int siglen = MAX_GPG_SIGNATURE_SIZE;
|
||||
|
@ -2241,6 +2244,8 @@ std::string p3GroupDistrib::publishMsg(RsDistribMsg *msg, bool personalSign)
|
|||
{
|
||||
signedMsg->personalSignature.signData.setBinData(sigbuf, siglen);
|
||||
signedMsg->personalSignature.keyId = AuthGPG::getAuthGPG()->getGPGOwnId();
|
||||
} else {
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2249,6 +2254,11 @@ std::string p3GroupDistrib::publishMsg(RsDistribMsg *msg, bool personalSign)
|
|||
EVP_MD_CTX_destroy(mdctx);
|
||||
delete[] out_data;
|
||||
|
||||
if (ok == false) {
|
||||
delete signedMsg;
|
||||
return msgId;
|
||||
}
|
||||
|
||||
} /* END STACK MUTEX */
|
||||
|
||||
/* extract Ids from publishSignature */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue