From 706eb63c316bf1d9caccff207e18f7932e75122b Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 9 Feb 2020 08:24:06 +0000 Subject: [PATCH] Minor memory leaks in Pageant client code. (cherry picked from commit 8677ee00fb55ddfa0eb7d554bfb9da0c778a8acf) --- pageant.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pageant.c b/pageant.c index ba334cc3..6ade4ccb 100644 --- a/pageant.c +++ b/pageant.c @@ -1294,6 +1294,7 @@ int pageant_add_keyfile(Filename *filename, const char *passphrase, return PAGEANT_ACTION_FAILURE; } + sfree(skey->comment); ssh_key_free(skey->key); sfree(skey); sfree(response); @@ -1391,6 +1392,7 @@ int pageant_enum_keys(pageant_key_enum_fn_t callback, void *callback_ctx, callback(callback_ctx, fingerprint, cbkey.comment, &cbkey); sfree(fingerprint); sfree(cbkey.comment); + strbuf_free(cbkey.blob); } sfree(keylist);