aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pam-freerdp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index 8979e6e..ff09ce4 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -120,6 +120,11 @@ get_item (pam_handle_t * pamh, int type)
}
if (type == PAM_AUTHTOK) {
+ if (strlen(promptval) == 0){
+ free(promptval);
+ return NULL;
+ }
+
if (mlock(promptval, strlen(promptval) + 1) != 0) {
free(promptval);
return NULL;