s3: Fix Coverity ID 709218 Uninitialized pointer read
[ambi/samba-autobuild/.git] / 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)) {