mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 06:38:37 -05:00
Fix minor memory leak in Pageant key removal.
It wasn't freeing the key comment along with the key data, probably because I originally based the code on the SSH-1 analogue and forgot that freersakey() *does* free the comment.
This commit is contained in:
parent
5129c40bea
commit
f6d04ef1c4
@ -725,6 +725,7 @@ void pageant_handle_msg(BinarySink *bs,
|
|||||||
del234(ssh2keys, key);
|
del234(ssh2keys, key);
|
||||||
keylist_update();
|
keylist_update();
|
||||||
key->alg->freekey(key->data);
|
key->alg->freekey(key->data);
|
||||||
|
sfree(key->comment);
|
||||||
sfree(key);
|
sfree(key);
|
||||||
put_byte(bs, SSH_AGENT_SUCCESS);
|
put_byte(bs, SSH_AGENT_SUCCESS);
|
||||||
|
|
||||||
@ -765,6 +766,7 @@ void pageant_handle_msg(BinarySink *bs,
|
|||||||
while ((skey = index234(ssh2keys, 0)) != NULL) {
|
while ((skey = index234(ssh2keys, 0)) != NULL) {
|
||||||
del234(ssh2keys, skey);
|
del234(ssh2keys, skey);
|
||||||
skey->alg->freekey(skey->data);
|
skey->alg->freekey(skey->data);
|
||||||
|
sfree(skey->comment);
|
||||||
sfree(skey);
|
sfree(skey);
|
||||||
}
|
}
|
||||||
keylist_update();
|
keylist_update();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user