]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:mdssd: Fix creating binding string for error message
authorAndreas Schneider <asn@samba.org>
Wed, 25 Nov 2020 11:55:56 +0000 (12:55 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 26 Nov 2020 09:44:42 +0000 (09:44 +0000)
Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/rpc_server/mdssd.c

index baab1039e2e8e96ed9e9aa3d8e32f3631f14ec97..d4ef815cd6c68cff604d90ea1f3d2b23fd591f5b 100644 (file)
@@ -526,8 +526,11 @@ static NTSTATUS mdssd_create_sockets(struct tevent_context *ev_ctx,
        for (i = 0; i < *listen_fd_size; i++) {
                rc = listen(listen_fd[i].fd, pf_mdssd_cfg.max_allowed_clients);
                if (rc == -1) {
-                       char *ep_string = dcerpc_binding_string(
-                                       dce_ctx, e->ep_description);
+                       char *ep_string = NULL;
+
+                       e = listen_fd[i].fd_data;
+                       ep_string = dcerpc_binding_string(dce_ctx,
+                                                         e->ep_description);
                        DBG_ERR("Failed to listen on endpoint '%s': %s\n",
                                ep_string, strerror(errno));
                        status = map_nt_error_from_unix(errno);