From be0b7cee83129f361401c9510849c62a62286b77 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 28 Jun 2019 19:22:39 +0100 Subject: [PATCH] cmdgen: fix a tiny memory leak. One of those things you'd never notice if it weren't for Leak Sanitiser happening to be turned on while you were doing something else: freersakey() frees all the things pointed to _from_ an RSAKey structure, but not the structure itself. --- cmdgen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmdgen.c b/cmdgen.c index 4d6d9e4e..ae53d6f1 100644 --- a/cmdgen.c +++ b/cmdgen.c @@ -1076,6 +1076,7 @@ int main(int argc, char **argv) if (ssh1key) { freersakey(ssh1key); + sfree(ssh1key); } if (ssh2key) { sfree(ssh2key->comment);