aboutsummaryrefslogtreecommitdiff
path: root/lib/libvfio-user.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libvfio-user.c')
-rw-r--r--lib/libvfio-user.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/libvfio-user.c b/lib/libvfio-user.c
index e4abfad..3f67992 100644
--- a/lib/libvfio-user.c
+++ b/lib/libvfio-user.c
@@ -1214,22 +1214,15 @@ get_request_header(vfu_ctx_t *vfu_ctx, vfu_msg_t **msgp)
*msgp = alloc_msg(&hdr, fds, nr_fds);
if (*msgp == NULL) {
- ret = -1;
- goto out;
- }
-
- return 0;
-
-out:
- if (ret != 0) {
int saved_errno = errno;
for (i = 0; i < nr_fds; i++) {
close(fds[i]);
}
errno = saved_errno;
+ return -1;
}
- return ret;
+ return 0;
}
static bool