From ed8a47c1dd06e30cf49d814c2ad5f2a9c93f807b Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 29 Jan 2019 20:12:37 +0000 Subject: [PATCH] cmdgen: fix error report after ssh2_userkey_loadpub fails. We strbuf_free(ssh2blob), but forgot to null the pointer out afterwards, which means a subsequent check for NULL believes there wasn't a problem, and nulls out the error message pointer instead! --- cmdgen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmdgen.c b/cmdgen.c index 171214fc..5a52b317 100644 --- a/cmdgen.c +++ b/cmdgen.c @@ -817,6 +817,7 @@ int main(int argc, char **argv) bits = -1; } else { strbuf_free(ssh2blob); + ssh2blob = NULL; } sfree(ssh2alg); } else {