fixed memleak in openssl fingerprinting
This commit is contained in:
@@ -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->allocate_hash(hasher, key, fp);
|
||||||
hasher->destroy(hasher);
|
hasher->destroy(hasher);
|
||||||
|
free(key.ptr);
|
||||||
lib->encoding->cache(lib->encoding, type, ec, *fp);
|
lib->encoding->cache(lib->encoding, type, ec, *fp);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ bool openssl_rsa_fingerprint(RSA *rsa, key_encoding_type_t type, chunk_t *fp)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
hasher->allocate_hash(hasher, key, fp);
|
hasher->allocate_hash(hasher, key, fp);
|
||||||
|
free(key.ptr);
|
||||||
hasher->destroy(hasher);
|
hasher->destroy(hasher);
|
||||||
lib->encoding->cache(lib->encoding, type, rsa, *fp);
|
lib->encoding->cache(lib->encoding, type, rsa, *fp);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user