diff options
author | John Levon <john.levon@nutanix.com> | 2021-05-07 19:22:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 19:22:09 +0100 |
commit | 12ee57e1101e7059361d41011211bc4e8aef20fc (patch) | |
tree | 3ddfe096e194366378cf49224fba07582db813b5 /lib | |
parent | f87e78fcf904688846c9d4490397f3bdf07d424f (diff) | |
download | libvfio-user-12ee57e1101e7059361d41011211bc4e8aef20fc.zip libvfio-user-12ee57e1101e7059361d41011211bc4e8aef20fc.tar.gz libvfio-user-12ee57e1101e7059361d41011211bc4e8aef20fc.tar.bz2 |
don't close outgoing message fds (#472)
We made a silly mistake in free_msg(): the file descriptors we send out in
message replies should never be closed.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libvfio-user.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/libvfio-user.c b/lib/libvfio-user.c index 817d9e9..92c1724 100644 --- a/lib/libvfio-user.c +++ b/lib/libvfio-user.c @@ -717,12 +717,6 @@ free_msg(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg) } free(msg->in_fds); - - for (i = 0; i < msg->nr_out_fds; i++) { - assert(msg->out_fds[i] != -1); - close(msg->out_fds[i]); - } - free(msg->out_fds); assert(msg->out_data == NULL || msg->out_iovecs == NULL); |