fixed memleak in openssl fingerprinting
This commit is contained in:
parent
b12c6d163d
commit
1a8ef8aabc
|
@ -230,6 +230,7 @@ bool openssl_ec_fingerprint(EC_KEY *ec, key_encoding_type_t type, chunk_t *fp)
|
|||
}
|
||||
hasher->allocate_hash(hasher, key, fp);
|
||||
hasher->destroy(hasher);
|
||||
free(key.ptr);
|
||||
lib->encoding->cache(lib->encoding, type, ec, *fp);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -205,6 +205,7 @@ bool openssl_rsa_fingerprint(RSA *rsa, key_encoding_type_t type, chunk_t *fp)
|
|||
return FALSE;
|
||||
}
|
||||
hasher->allocate_hash(hasher, key, fp);
|
||||
free(key.ptr);
|
||||
hasher->destroy(hasher);
|
||||
lib->encoding->cache(lib->encoding, type, rsa, *fp);
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue