summaryrefslogtreecommitdiffhomepage
path: root/svr-authpubkey.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-03-06 22:18:20 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-03-06 22:18:20 +0800
commite9edbe8bb204b00c7f4b4fda7eeee9d0177934ae (patch)
tree68c30f5a071a73dcd421ee932e46b8602c6221c0 /svr-authpubkey.c
parent4fd3160179620e26e90b38ec9b093aa893cd0911 (diff)
avoid leak of pubkey_options
Diffstat (limited to 'svr-authpubkey.c')
-rw-r--r--svr-authpubkey.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/svr-authpubkey.c b/svr-authpubkey.c
index 0ca0ea4..e97b158 100644
--- a/svr-authpubkey.c
+++ b/svr-authpubkey.c
@@ -167,6 +167,10 @@ out:
sign_key_free(key);
key = NULL;
}
+ /* Retain pubkey options only if auth succeeded */
+ if (!ses.authstate.authdone) {
+ svr_pubkey_options_cleanup();
+ }
TRACE(("leave pubkeyauth"))
}