mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-22 09:27:04 +00:00
Memory leak per TLS session removed. Call cleanup after each finalization.
This commit is contained in:
parent
326e7a3eab
commit
ac8ca39406
1 changed files with 2 additions and 2 deletions
|
@ -589,12 +589,14 @@ static int tls_P_hash(ssl,secret,seed,md,out)
|
|||
HMAC_Init(&hm,secret->data,secret->len,md);
|
||||
HMAC_Update(&hm,A,A_l);
|
||||
HMAC_Final(&hm,_A,&A_l);
|
||||
HMAC_cleanup(&hm);
|
||||
A=_A;
|
||||
|
||||
HMAC_Init(&hm,secret->data,secret->len,md);
|
||||
HMAC_Update(&hm,A,A_l);
|
||||
HMAC_Update(&hm,seed->data,seed->len);
|
||||
HMAC_Final(&hm,tmp,&tmp_l);
|
||||
HMAC_cleanup(&hm);
|
||||
|
||||
tocpy=MIN(left,tmp_l);
|
||||
memcpy(ptr,tmp,tocpy);
|
||||
|
@ -602,8 +604,6 @@ static int tls_P_hash(ssl,secret,seed,md,out)
|
|||
left-=tocpy;
|
||||
}
|
||||
|
||||
HMAC_cleanup(&hm);
|
||||
|
||||
CRDUMPD("P_hash out",out);
|
||||
|
||||
return (0);
|
||||
|
|
Loading…
Reference in a new issue