s3: Fix Coverity ID 709218 Uninitialized pointer read
authorVolker Lendecke <vl@samba.org>
Fri, 29 Jun 2012 10:37:40 +0000 (12:37 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 3 Jul 2012 11:39:42 +0000 (13:39 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
source3/smbd/conn_idle.c

index 23dcc8988a95cf482319dcf0d13d5a49424e03d2..60263667c12da93318068aa48385d5d99cb4d50e 100644 (file)
@@ -105,6 +105,11 @@ void conn_force_tdis(struct smbd_server_connection *sconn, const char *sharename
 
                next = conn->next;
 
+               if (conn->tcon == NULL) {
+                       continue;
+               }
+               tcon = conn->tcon;
+
                if (close_all) {
                        do_close = true;
                } else if (strequal(lp_servicename(SNUM(conn)), sharename)) {