From a1816395211c7acfa24b0eabfcb5f05ca5fcc074 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 13 May 2015 13:22:44 +0100 Subject: [PATCH] Unix Pageant: fix a double-free when adding keys. I had freed the comment string coming back from pageant_add_keyfile, but not NULLed out the pointer, so that the cleanup code at the end of the function would have freed it again. --- unix/uxpgnt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/unix/uxpgnt.c b/unix/uxpgnt.c index c9036eed..0329f6b9 100644 --- a/unix/uxpgnt.c +++ b/unix/uxpgnt.c @@ -331,6 +331,7 @@ static int unix_add_keyfile(const char *filename_str) while (1) { char *passphrase = askpass(err); sfree(err); + err = NULL; if (!passphrase) break; -- 2.45.2