svn commit: samba r22022 - in branches/SAMBA_3_0/source/auth: .
abartlet at samba.org
abartlet at samba.org
Mon Apr 2 05:53:34 GMT 2007
Author: abartlet
Date: 2007-04-02 05:53:34 +0000 (Mon, 02 Apr 2007)
New Revision: 22022
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22022
Log:
- Clarify the comments
- make sure never to free an uninitialised variable
- ensure to free result on getpwnam_alloc failure
Andrew Bartlett
Modified:
branches/SAMBA_3_0/source/auth/auth_sam.c
branches/SAMBA_3_0/source/auth/auth_util.c
Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth_sam.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth_sam.c 2007-04-02 04:47:19 UTC (rev 22021)
+++ branches/SAMBA_3_0/source/auth/auth_sam.c 2007-04-02 05:53:34 UTC (rev 22022)
@@ -263,8 +263,8 @@
return NT_STATUS_UNSUCCESSFUL;
}
- /* Can't use the talloc version here, because the returned struct gets
- kept on the server_info */
+ /* the returned struct gets kept on the server_info, by means
+ of a steal further down */
if ( !(sampass = samu_new( mem_ctx )) ) {
return NT_STATUS_NO_MEMORY;
Modified: branches/SAMBA_3_0/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth_util.c 2007-04-02 04:47:19 UTC (rev 22021)
+++ branches/SAMBA_3_0/source/auth/auth_util.c 2007-04-02 05:53:34 UTC (rev 22022)
@@ -562,13 +562,13 @@
if ( !(result = make_server_info(NULL)) ) {
- TALLOC_FREE(pwd);
return NT_STATUS_NO_MEMORY;
}
if ( !(pwd = getpwnam_alloc(result, pdb_get_username(sampass))) ) {
DEBUG(1, ("User %s in passdb, but getpwnam() fails!\n",
pdb_get_username(sampass)));
+ TALLOC_FREE(result);
return NT_STATUS_NO_SUCH_USER;
}
More information about the samba-cvs
mailing list