mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
fixed memory leaks
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5167 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ad5ca59a7a
commit
ba56f5f611
7 changed files with 33 additions and 43 deletions
|
@ -23,12 +23,12 @@ std::string PGPIdType::toStdString() const
|
|||
{
|
||||
static const char out[16] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' } ;
|
||||
|
||||
std::string res ;
|
||||
std::string res(KEY_ID_SIZE*2,' ') ;
|
||||
|
||||
for(int j = 0; j < KEY_ID_SIZE; j++)
|
||||
{
|
||||
res += out[ (bytes[j]>>4) ] ;
|
||||
res += out[ bytes[j] & 0xf ] ;
|
||||
res[2*j ] = out[ (bytes[j]>>4) ] ;
|
||||
res[2*j+1] = out[ bytes[j] & 0xf ] ;
|
||||
}
|
||||
|
||||
return res ;
|
||||
|
@ -37,12 +37,12 @@ std::string PGPFingerprintType::toStdString() const
|
|||
{
|
||||
static const char out[16] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' } ;
|
||||
|
||||
std::string res ;
|
||||
std::string res(KEY_FINGERPRINT_SIZE*2,' ') ;
|
||||
|
||||
for(int j = 0; j < KEY_FINGERPRINT_SIZE; j++)
|
||||
{
|
||||
res += out[ (bytes[j]>>4) ] ;
|
||||
res += out[ bytes[j] & 0xf ] ;
|
||||
res[2*j ] = out[ (bytes[j]>>4) ] ;
|
||||
res[2*j+1] = out[ bytes[j] & 0xf ] ;
|
||||
}
|
||||
|
||||
return res ;
|
||||
|
@ -449,7 +449,7 @@ bool PGPHandler::GeneratePGPCertificate(const std::string& name, const std::stri
|
|||
|
||||
// 7 - validate own signature and update certificate.
|
||||
|
||||
validateAndUpdateSignatures(_public_keyring_map[ pgpId.toStdString() ],getPublicKey(pgpId)) ;
|
||||
// validateAndUpdateSignatures(_public_keyring_map[ pgpId.toStdString() ],getPublicKey(pgpId)) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue