pyldb: avoid segfault when adding an element with no name
[sfrench/samba-autobuild/.git] / lib / tevent / echo_server.c
index 3b2122dac114a21eb14ae5216d587e8216be4e68..f93d8bcdee7200ca66bac11a3a2b202c55678acc 100644 (file)
@@ -118,7 +118,7 @@ static void accept_handler(struct tevent_context *ev, struct tevent_fd *fde,
                tevent_req_error(req, errno);
                return;
        }
-       smb_set_close_on_exec(state->listen_sock);
+       smb_set_close_on_exec(ret);
        state->sock = ret;
        tevent_req_done(req);
 }