summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-03-13 06:56:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:10 -0500
commit27c9674455e8741f13bdfb13fcf3c36ae94c3dc8 (patch)
tree6c58c50677acb4e27a221dc7c5125e967762d53b /source4
parent3ea60662fd687124483cad2f56f787c3b3d73f22 (diff)
downloadsamba-27c9674455e8741f13bdfb13fcf3c36ae94c3dc8.tar.gz
samba-27c9674455e8741f13bdfb13fcf3c36ae94c3dc8.tar.bz2
samba-27c9674455e8741f13bdfb13fcf3c36ae94c3dc8.zip
r14305: fixed a memory leak and a break error
(This used to be commit c791db60c88ed0f50aa7b13822f95f6f17360fee)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/auth_unix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/auth/auth_unix.c b/source4/auth/auth_unix.c
index 417025dfdf..959eb6703c 100644
--- a/source4/auth/auth_unix.c
+++ b/source4/auth/auth_unix.c
@@ -197,6 +197,7 @@ static int smb_pam_conv(int num_msg, const struct pam_message **msg,
(*reply)[num].resp_retcode = PAM_SUCCESS;
(*reply)[num].resp = NULL;
DEBUG(4,("PAM Info message in conversation function: %s\n", (msg[num]->msg)));
+ break;
case PAM_ERROR_MSG:
(*reply)[num].resp_retcode = PAM_SUCCESS;
@@ -205,6 +206,10 @@ static int smb_pam_conv(int num_msg, const struct pam_message **msg,
break;
default:
+ while (num > 0) {
+ SAFE_FREE((*reply)[num-1].resp);
+ num--;
+ }
SAFE_FREE(*reply);
*reply = NULL;
DEBUG(1,("Error: PAM subsystme sent an UNKNOWN message type to the conversation function!\n"));