mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed memory leak in key signature verification
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6539 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a823cc9edc
commit
fced5af60c
@ -388,7 +388,7 @@ bool p3DistribSecurity::validateDistribGrp(RsDistribGrp *newGrp)
|
|||||||
unsigned int siglen = tmpSign.signData.bin_len;
|
unsigned int siglen = tmpSign.signData.bin_len;
|
||||||
|
|
||||||
/* clear signature */
|
/* clear signature */
|
||||||
newGrp->adminSignature.ShallowClear();
|
newGrp->adminSignature.TlvClear();
|
||||||
|
|
||||||
uint32_t size = serialType->size(newGrp);
|
uint32_t size = serialType->size(newGrp);
|
||||||
char* data = new char[size];
|
char* data = new char[size];
|
||||||
@ -415,7 +415,7 @@ bool p3DistribSecurity::validateDistribGrp(RsDistribGrp *newGrp)
|
|||||||
|
|
||||||
/* restore signature */
|
/* restore signature */
|
||||||
newGrp->adminSignature = tmpSign;
|
newGrp->adminSignature = tmpSign;
|
||||||
tmpSign.ShallowClear();
|
tmpSign.TlvClear();
|
||||||
|
|
||||||
/* clean up */
|
/* clean up */
|
||||||
EVP_PKEY_free(key);
|
EVP_PKEY_free(key);
|
||||||
|
Loading…
Reference in New Issue
Block a user