svn commit: samba r14305 - in branches/SAMBA_4_0/source/auth: .

tridge at samba.org tridge at samba.org
Mon Mar 13 06:56:08 GMT 2006


Author: tridge
Date: 2006-03-13 06:56:07 +0000 (Mon, 13 Mar 2006)
New Revision: 14305

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14305

Log:

fixed a memory leak and a break error

Modified:
   branches/SAMBA_4_0/source/auth/auth_unix.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/auth_unix.c
===================================================================
--- branches/SAMBA_4_0/source/auth/auth_unix.c	2006-03-13 06:52:09 UTC (rev 14304)
+++ branches/SAMBA_4_0/source/auth/auth_unix.c	2006-03-13 06:56:07 UTC (rev 14305)
@@ -197,6 +197,7 @@
 				(*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 @@
 				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"));



More information about the samba-cvs mailing list