зеркало из https://github.com/github/putty.git
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:
Родитель
5129c40bea
Коммит
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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче