diff options
Diffstat (limited to 'source3/lib/unix_msg')
-rw-r--r-- | source3/lib/unix_msg/unix_msg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c index be46a43e10..4870068383 100644 --- a/source3/lib/unix_msg/unix_msg.c +++ b/source3/lib/unix_msg/unix_msg.c @@ -339,6 +339,12 @@ static void unix_dgram_recv_handler(struct poll_watch *w, int fd, short events, ctx->recv_callback(ctx, ctx->recv_buf, received, fds, num_fds, ctx->private_data); + + /* + * Close those fds that the callback has not set to -1. + */ + close_fd_array(fds, num_fds); + return; cleanup_fds: |