s4-socket: detect NULL server in socket connection code
[nivanova/samba-autobuild/.git] / source4 / lib / socket / connect_multi.c
index 96277a6139518f9f5172082e94453caf76c2bbab..5358606896d49f8e4437e676036409b013abb925 100644 (file)
@@ -132,6 +132,11 @@ static void connect_multi_next_socket(struct composite_context *result)
 
        multi->num_connects_sent += 1;
 
+       if (multi->server_address == NULL) {
+               composite_error(result, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+               return;
+       }
+
        state = talloc(multi, struct connect_one_state);
        if (composite_nomem(state, result)) return;