diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2020-11-23 05:32:25 -0500 |
---|---|---|
committer | Thanos <tmakatos@gmail.com> | 2020-11-23 12:56:08 +0000 |
commit | 38fb28dd2fc9d2387c0c2ad53750fc164d9781a7 (patch) | |
tree | 3ab5daa9a3e6176befd4fea391ba8f2166044b15 /lib/tran_sock.c | |
parent | 70c0d8daeb65a881ce93178e628c309545857c25 (diff) | |
download | libvfio-user-38fb28dd2fc9d2387c0c2ad53750fc164d9781a7.zip libvfio-user-38fb28dd2fc9d2387c0c2ad53750fc164d9781a7.tar.gz libvfio-user-38fb28dd2fc9d2387c0c2ad53750fc164d9781a7.tar.bz2 |
don't leak fd on failure
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/tran_sock.c')
-rw-r--r-- | lib/tran_sock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tran_sock.c b/lib/tran_sock.c index 9e73493..6637b40 100644 --- a/lib/tran_sock.c +++ b/lib/tran_sock.c @@ -507,6 +507,7 @@ open_sock(lm_ctx_t *lm_ctx) ret = negotiate(lm_ctx, conn_fd); if (ret < 0) { + close(conn_fd); return ret; } |