summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Hamacher <kevin.hamacher@rub.de>2016-04-25 20:19:54 +0200
committerKevin Hamacher <kevin.hamacher@rub.de>2016-04-25 20:24:33 +0200
commit480efede66ab926dcf0516663294b9cd6ef69c70 (patch)
treea9e3d1a0afaab192f7785e8e0856a28620e3d709
parent0a6f952a3a8c25593243531f71f998c1d6fe69d0 (diff)
swaylock: fix double free
-rw-r--r--main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/main.c b/main.c
index 1885b51..777bca0 100644
--- a/main.c
+++ b/main.c
@@ -90,7 +90,7 @@ int function_conversation(int num_msg, const struct pam_message **msg,
}
/**
- * password will be zeroed out.
+ * Note: PAM will free() 'password' during the process
*/
bool verify_password() {
struct passwd *passwd = getpwuid(getuid());
@@ -131,7 +131,6 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
redraw_screen = 1;
password_size = 1024;
- free(password);
password = malloc(password_size);
password[0] = '\0';
break;