]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-afsd-uninit-vars-20070806
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 7 Aug 2007 05:00:49 +0000 (05:00 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 7 Aug 2007 05:00:49 +0000 (05:00 +0000)
FIXES 67126

ensure the connp is set to NULL in case of error

(cherry picked from commit 8c69510d92052607f94d947ce2dd3e0b40eee42f)

src/WINNT/afsd/cm_conn.c

index 275afde2f8531e70e7836d20dd88d8d5e04590a3..b635998ccad6f4522307883ac6ec80e0cdc735c5 100644 (file)
@@ -709,13 +709,13 @@ long cm_ConnByMServers(cm_serverRef_t *serversp, cm_user_t *usersp,
     struct timeval now;
 #endif /* DJGPP */        
 
+    *connpp = NULL;
+
     if (serversp == NULL) {
        osi_Log1(afsd_logp, "cm_ConnByMServers returning 0x%x", CM_ERROR_ALLDOWN);
        return CM_ERROR_ALLDOWN;
     }
 
-    *connpp = NULL;
-
 #ifndef DJGPP
     timeUsed = (GetTickCount() - reqp->startTime) / 1000;
 #else
@@ -868,6 +868,8 @@ long cm_ConnByServer(cm_server_t *serverp, cm_user_t *userp, cm_conn_t **connpp)
     cm_conn_t *tcp;
     cm_ucell_t *ucellp;
 
+    *connpp = NULL;
+
     lock_ObtainMutex(&userp->mx);
     lock_ObtainWrite(&cm_connLock);
     for (tcp = serverp->connsp; tcp; tcp=tcp->nextp) {