From ca229b0980b5c78f140180db764b3229d5ccb078 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 21 Feb 2007 02:15:23 +0000 Subject: r21483: Fix use of uninitialized variable. Jeremy. (This used to be commit 4a74d042c9108ed68cc92f27b390c261c0bc8885) --- source3/smbd/sesssetup.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 4e27914c0d..7a5f8be47f 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -670,6 +670,9 @@ static struct pending_auth_data *pd_list; 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 struct pending_auth_data *get_pending_auth_data(uint16 smbpid) 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 @@ static NTSTATUS check_spnego_blob_complete(uint16 smbpid, uint16 vuid, DATA_BLOB return NT_STATUS_OK; } - pad = get_pending_auth_data(smbpid); - /* Were we waiting for more data ? */ if (pad) { DATA_BLOB tmp_blob; -- cgit