mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 00:11:28 +00:00
Merge pull request #603 from fluxchief/master
swaylock: fix double free
This commit is contained in:
commit
70f0099918
|
@ -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() {
|
bool verify_password() {
|
||||||
struct passwd *passwd = getpwuid(getuid());
|
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;
|
redraw_screen = 1;
|
||||||
|
|
||||||
password_size = 1024;
|
password_size = 1024;
|
||||||
free(password);
|
|
||||||
password = malloc(password_size);
|
password = malloc(password_size);
|
||||||
password[0] = '\0';
|
password[0] = '\0';
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue