svn commit: samba r21483 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd

jra at samba.org jra at samba.org
Wed Feb 21 02:15:23 GMT 2007


Author: jra
Date: 2007-02-21 02:15:23 +0000 (Wed, 21 Feb 2007)
New Revision: 21483

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

Log:
Fix use of uninitialized variable.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/sesssetup.c
   branches/SAMBA_3_0_25/source/smbd/sesssetup.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/sesssetup.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/sesssetup.c	2007-02-21 02:11:06 UTC (rev 21482)
+++ branches/SAMBA_3_0/source/smbd/sesssetup.c	2007-02-21 02:15:23 UTC (rev 21483)
@@ -670,6 +670,9 @@
 
 static void delete_partial_auth(struct pending_auth_data *pad)
 {
+	if (!pad) {
+		return;
+	}
 	DLIST_REMOVE(pd_list, pad);
 	data_blob_free(&pad->partial_data);
 	SAFE_FREE(pad);
@@ -698,10 +701,12 @@
 
 static NTSTATUS check_spnego_blob_complete(uint16 smbpid, uint16 vuid, DATA_BLOB *pblob)
 {
-	struct pending_auth_data *pad;
+	struct pending_auth_data *pad = NULL;
 	ASN1_DATA data;
 	size_t needed_len = 0;
 
+	pad = get_pending_auth_data(smbpid);
+
 	/* Ensure we have some data. */
 	if (pblob->length == 0) {
 		/* Caller can cope. */
@@ -710,8 +715,6 @@
 		return NT_STATUS_OK;
 	}
 
-	pad = get_pending_auth_data(smbpid);
-
 	/* Were we waiting for more data ? */
 	if (pad) {
 		DATA_BLOB tmp_blob;

Modified: branches/SAMBA_3_0_25/source/smbd/sesssetup.c
===================================================================
--- branches/SAMBA_3_0_25/source/smbd/sesssetup.c	2007-02-21 02:11:06 UTC (rev 21482)
+++ branches/SAMBA_3_0_25/source/smbd/sesssetup.c	2007-02-21 02:15:23 UTC (rev 21483)
@@ -670,6 +670,9 @@
 
 static void delete_partial_auth(struct pending_auth_data *pad)
 {
+	if (!pad) {
+		return;
+	}
 	DLIST_REMOVE(pd_list, pad);
 	data_blob_free(&pad->partial_data);
 	SAFE_FREE(pad);
@@ -698,10 +701,12 @@
 
 static NTSTATUS check_spnego_blob_complete(uint16 smbpid, uint16 vuid, DATA_BLOB *pblob)
 {
-	struct pending_auth_data *pad;
+	struct pending_auth_data *pad = NULL;
 	ASN1_DATA data;
 	size_t needed_len = 0;
 
+	pad = get_pending_auth_data(smbpid);
+
 	/* Ensure we have some data. */
 	if (pblob->length == 0) {
 		/* Caller can cope. */
@@ -710,8 +715,6 @@
 		return NT_STATUS_OK;
 	}
 
-	pad = get_pending_auth_data(smbpid);
-
 	/* Were we waiting for more data ? */
 	if (pad) {
 		DATA_BLOB tmp_blob;



More information about the samba-cvs mailing list