From: Volker Lendecke Date: Thu, 9 Jan 2020 13:43:02 +0000 (+0100) Subject: printing: Avoid EBADF from EPOLL_CTL_DEL X-Git-Tag: ldb-2.1.0~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d78b4a841e2ea7b279ae1f3039216723d24220d4;p=thirdparty%2Fsamba.git printing: Avoid EBADF from EPOLL_CTL_DEL TALLOC_FREE the fde before closing the fd. Otherwise the fde destructor tries to remove a nonexisting fd from the epoll set. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c index 96bda2d34b6..b52f7e25da5 100644 --- a/source3/printing/print_cups.c +++ b/source3/printing/print_cups.c @@ -573,9 +573,9 @@ static void cups_async_callback(struct tevent_context *event_ctx, err_out: pcap_cache_destroy_specific(&tmp_pcap_cache); TALLOC_FREE(frame); + TALLOC_FREE(cache_fd_event); close(cb_args->pipe_fd); TALLOC_FREE(cb_args); - TALLOC_FREE(cache_fd_event); } bool cups_cache_reload(struct tevent_context *ev,