summaryrefslogtreecommitdiff
path: root/libpam
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2005-09-02 11:59:32 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2005-09-02 11:59:32 +0000
commitcde46e48b824a65d2697c20747167e40cf533c3a (patch)
treeeeb71cee4393ca759d0c411001d208932d590e2d /libpam
parent44e952f399551aba882a9676ea10243b896a214c (diff)
Relevant BUGIDs: none
Purpose of commit: bugfix Commit summary: --------------- Fix memory leak (patch by Dmitry V. Levin)
Diffstat (limited to 'libpam')
-rw-r--r--libpam/pam_vprompt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpam/pam_vprompt.c b/libpam/pam_vprompt.c
index 0239c8f4..2c6ce757 100644
--- a/libpam/pam_vprompt.c
+++ b/libpam/pam_vprompt.c
@@ -83,6 +83,11 @@ pam_vprompt (pam_handle_t *pamh, int style, char **response,
retval = conv->conv (1, &pmsg, &pam_resp, conv->appdata_ptr);
if (response)
*response = pam_resp == NULL ? NULL : pam_resp->resp;
+ else if (pam_resp && pam_resp->resp)
+ {
+ _pam_overwrite (pam_resp->resp);
+ _pam_drop (pam_resp->resp);
+ }
_pam_overwrite (msgbuf);
_pam_drop (pam_resp);
free (msgbuf);