aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2016-04-25 20:30:11 +0200
committerFurkan Sahin <furkan-dev@proton.me>2016-04-25 20:30:11 +0200
commitad4d5bad961450c99398e3a5d39dd6d9b901c940 (patch)
tree16dd949d69e62edbc445e61adc60dd7d108fec58
parent6ded58859f30ca62fbf1ef4e4dfcf539ca9f6d86 (diff)
parent9d805d36b32576d001b21ce6c51762fed4637465 (diff)
Merge pull request #603 from fluxchief/master
swaylock: fix double free
-rw-r--r--swaylock/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/swaylock/main.c b/swaylock/main.c
index 1885b511..777bca09 100644
--- a/swaylock/main.c
+++ b/swaylock/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;