mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00: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);
|
||||
keylist_update();
|
||||
key->alg->freekey(key->data);
|
||||
sfree(key->comment);
|
||||
sfree(key);
|
||||
put_byte(bs, SSH_AGENT_SUCCESS);
|
||||
|
||||
@ -765,6 +766,7 @@ void pageant_handle_msg(BinarySink *bs,
|
||||
while ((skey = index234(ssh2keys, 0)) != NULL) {
|
||||
del234(ssh2keys, skey);
|
||||
skey->alg->freekey(skey->data);
|
||||
sfree(skey->comment);
|
||||
sfree(skey);
|
||||
}
|
||||
keylist_update();
|
||||
|
Loading…
Reference in New Issue
Block a user