summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorAlessandro Bono <alessandro.bono369@gmail.com>2022-09-13 16:11:04 +0200
committerRay Strode <halfline@gmail.com>2022-09-27 15:18:26 +0000
commit8edb5c4aef9bfa3a1d12a496c289644d330d3407 (patch)
treeb4eb88162de85bad829082dd0b442c696a6eeecb /daemon
parenta95d9169a1ce0f0c280da4152269551651ea902b (diff)
downloadgdm-8edb5c4aef9bfa3a1d12a496c289644d330d3407.tar.gz
gdm-session-worker: Plug a memory leak
If we can't pass the replies to the caller, free them.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm-session-worker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index a264ea1d..7e6ad76c 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -858,7 +858,7 @@ gdm_session_worker_pam_new_messages_handler (int number_o
return_value = PAM_SUCCESS;
out:
- if (return_value != PAM_SUCCESS) {
+ if (return_value != PAM_SUCCESS || responses == NULL) {
for (i = 0; i < number_of_messages; i++) {
if (replies[i].resp != NULL) {
memset (replies[i].resp, 0, strlen (replies[i].resp));