aboutsummaryrefslogtreecommitdiff
path: root/lib/tran_sock.c
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2020-11-27 11:45:18 -0500
committerThanos <tmakatos@gmail.com>2020-12-01 15:41:25 +0000
commite34f5b118b7400d987ecae1f3b53eca27074d279 (patch)
tree65c772f6b5207d33e11a11130257545302c743bc /lib/tran_sock.c
parent9e01633253c24d7f15be36c8edd5d192601d1795 (diff)
downloadlibvfio-user-e34f5b118b7400d987ecae1f3b53eca27074d279.zip
libvfio-user-e34f5b118b7400d987ecae1f3b53eca27074d279.tar.gz
libvfio-user-e34f5b118b7400d987ecae1f3b53eca27074d279.tar.bz2
don't leak passed file descriptors on failure
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/tran_sock.c')
-rw-r--r--lib/tran_sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tran_sock.c b/lib/tran_sock.c
index ad57ccc..74e50f7 100644
--- a/lib/tran_sock.c
+++ b/lib/tran_sock.c
@@ -651,7 +651,7 @@ close_sock(vfu_ctx_t *vfu_ctx)
static int
get_request_sock(vfu_ctx_t *vfu_ctx, struct vfio_user_header *hdr,
- int *fds, int *nr_fds)
+ int *fds, size_t *nr_fds)
{
int ret;
struct iovec iov = {.iov_base = hdr, .iov_len = sizeof *hdr};