diff options
author | 2016-04-25 20:30:11 +0200 | |
---|---|---|
committer | 2016-04-25 20:30:11 +0200 | |
commit | 70f0099918587483ca523bd11c309c046fea037c (patch) | |
tree | 16dd949d69e62edbc445e61adc60dd7d108fec58 /swaylock/main.c | |
parent | Merge pull request #566 from mikkeloscar/tabbed-stacking-layout (diff) | |
parent | swaylock: fix double free (diff) | |
download | sway-70f0099918587483ca523bd11c309c046fea037c.tar.gz sway-70f0099918587483ca523bd11c309c046fea037c.tar.zst sway-70f0099918587483ca523bd11c309c046fea037c.zip |
Merge pull request #603 from fluxchief/master
swaylock: fix double free
Diffstat (limited to 'swaylock/main.c')
-rw-r--r-- | swaylock/main.c | 3 |
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, | |||
90 | } | 90 | } |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * password will be zeroed out. | 93 | * Note: PAM will free() 'password' during the process |
94 | */ | 94 | */ |
95 | bool verify_password() { | 95 | bool verify_password() { |
96 | struct passwd *passwd = getpwuid(getuid()); | 96 | 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 | |||
131 | redraw_screen = 1; | 131 | redraw_screen = 1; |
132 | 132 | ||
133 | password_size = 1024; | 133 | password_size = 1024; |
134 | free(password); | ||
135 | password = malloc(password_size); | 134 | password = malloc(password_size); |
136 | password[0] = '\0'; | 135 | password[0] = '\0'; |
137 | break; | 136 | break; |