summaryrefslogtreecommitdiffhomepage
path: root/svr-authpasswd.c
diff options
context:
space:
mode:
Diffstat (limited to 'svr-authpasswd.c')
-rw-r--r--svr-authpasswd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/svr-authpasswd.c b/svr-authpasswd.c
index cc9e838..7249553 100644
--- a/svr-authpasswd.c
+++ b/svr-authpasswd.c
@@ -87,6 +87,8 @@ void svr_auth_password() {
/* the first bytes of passwdcrypt are the salt */
testcrypt = crypt((char*)password, passwdcrypt);
+ m_burn(password, passwordlen);
+ m_free(password);
if (strcmp(testcrypt, passwdcrypt) == 0) {
/* successful authentication */
@@ -101,8 +103,6 @@ void svr_auth_password() {
send_msg_userauth_failure(0, 1);
}
- m_burn(password, passwordlen);
- m_free(password);
}
#endif /* DROPBEAR_PASSWORD_AUTH */