aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/passverify.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_unix/passverify.c')
-rw-r--r--modules/pam_unix/passverify.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
index e8d0b91d..85e7841e 100644
--- a/modules/pam_unix/passverify.c
+++ b/modules/pam_unix/passverify.c
@@ -522,20 +522,20 @@ PAMH_ARG_DECL(char * create_password_hash,
on(UNIX_BLOWFISH_PASS, ctrl) ? "blowfish" :
on(UNIX_SHA256_PASS, ctrl) ? "sha256" :
on(UNIX_SHA512_PASS, ctrl) ? "sha512" : algoid);
- if(sp) {
- pam_overwrite_string(sp);
- }
#ifdef HAVE_CRYPT_R
pam_overwrite_object(cdata);
free(cdata);
+#else
+ pam_overwrite_string(sp);
#endif
return NULL;
}
ret = strdup(sp);
- pam_overwrite_string(sp);
#ifdef HAVE_CRYPT_R
pam_overwrite_object(cdata);
free(cdata);
+#else
+ pam_overwrite_string(sp);
#endif
return ret;
}