svn commit: samba r16150 - branches/SAMBA_3_0/source/auth trunk/source/auth

vlendec at samba.org vlendec at samba.org
Mon Jun 12 11:03:49 GMT 2006


Author: vlendec
Date: 2006-06-12 11:03:49 +0000 (Mon, 12 Jun 2006)
New Revision: 16150

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

Log:
Fix possible NULL dereference found by Klocwork ID # 17
Modified:
   branches/SAMBA_3_0/source/auth/auth_util.c
   trunk/source/auth/auth_util.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth_util.c	2006-06-12 10:18:15 UTC (rev 16149)
+++ branches/SAMBA_3_0/source/auth/auth_util.c	2006-06-12 11:03:49 UTC (rev 16150)
@@ -1243,10 +1243,9 @@
 	}
 
 	result = make_server_info(NULL);
-
-	if (!NT_STATUS_IS_OK(status)) {
+	if (result == NULL) {
 		TALLOC_FREE(sampass);
-		return status;
+		return NT_STATUS_NO_MEMORY;
 	}
 
 	result->sam_account = sampass;

Modified: trunk/source/auth/auth_util.c
===================================================================
--- trunk/source/auth/auth_util.c	2006-06-12 10:18:15 UTC (rev 16149)
+++ trunk/source/auth/auth_util.c	2006-06-12 11:03:49 UTC (rev 16150)
@@ -1243,10 +1243,9 @@
 	}
 
 	result = make_server_info(NULL);
-
-	if (!NT_STATUS_IS_OK(status)) {
+	if (result == NULL) {
 		TALLOC_FREE(sampass);
-		return status;
+		return NT_STATUS_NO_MEMORY;
 	}
 
 	result->sam_account = sampass;



More information about the samba-cvs mailing list