avoid leak of pubkey_options

This commit is contained in:
Matt Johnston
2018-03-06 22:18:20 +08:00
parent 4fd3160179
commit e9edbe8bb2
3 changed files with 11 additions and 2 deletions

View File

@@ -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"))
}