aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2025-02-23 08:00:00 +0000
committerThorsten Kukuk <5908016+thkukuk@users.noreply.github.com>2025-02-25 09:29:03 +0100
commit42ba662f8b7d39aa29cbc21f6f7ecc69489d142d (patch)
tree3be3299b4e6d79971ecc541aad7ff385b5c2f7c4
parentdc6242a1bf47aadd1cb3ab8572167969f48621c0 (diff)
downloadpam-master.tar.gz
pam-master.tar.bz2
pam-master.zip
pam_issue: fix potential memory leak when PAM_USER_PROMPT is setHEADmaster
* modules/pam_issue/pam_issue.c (pam_sm_authenticate): Free issue_prompt before assigning a new string.
-rw-r--r--modules/pam_issue/pam_issue.c1
1 files changed, 1 insertions, 0 deletions
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;
}