From 42ba662f8b7d39aa29cbc21f6f7ecc69489d142d Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 23 Feb 2025 08:00:00 +0000 Subject: pam_issue: fix potential memory leak when PAM_USER_PROMPT is set * modules/pam_issue/pam_issue.c (pam_sm_authenticate): Free issue_prompt before assigning a new string. --- modules/pam_issue/pam_issue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/pam_issue/pam_issue.c b/modules/pam_issue/pam_issue.c index 52b11058..f0a97fca 100644 --- a/modules/pam_issue/pam_issue.c +++ b/modules/pam_issue/pam_issue.c @@ -314,6 +314,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED, retval = PAM_BUF_ERR; goto out; } + free(issue_prompt); issue_prompt = new_prompt; } -- cgit v1.2.3