1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

s3:unix_msg: close the fds in unix_dgram_recv_handler() after the callback has run

If the caller wants to use passed fds, he should copy them away
and set them to -1.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Michael Adam 2014-09-25 00:28:48 +02:00
parent 6e47886b15
commit 0ab5e895f7

View File

@ -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: