diff options
| author | Robin Ebert <ebertrobin2002@gmail.com> | 2022-05-30 11:50:30 +0200 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2022-06-15 10:49:32 +0200 |
| commit | bdeb891378bfcb2dc79de41cfeb6a62807d09b20 (patch) | |
| tree | a9eef0cdb2d2fba56404291ab25a0ce48402b79b /comm.c | |
| parent | fad5bc2f615bcee37b653887af0aebb334ec94b5 (diff) | |
Use mlock for password buffer
Diffstat (limited to 'comm.c')
| -rw-r--r-- | comm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5,6 +5,7 @@ #include "comm.h" #include "log.h" #include "swaylock.h" +#include "password-buffer.h" static int comm[2][2] = {{-1, -1}, {-1, -1}}; @@ -19,9 +20,8 @@ ssize_t read_comm_request(char **buf_ptr) { return -1; } swaylock_log(LOG_DEBUG, "received pw check request"); - char *buf = malloc(size); + char *buf = password_buffer_create(size); if (!buf) { - swaylock_log_errno(LOG_ERROR, "failed to malloc pw buffer"); return -1; } size_t offs = 0; |
