![Fabrice Fontaine](/assets/img/avatar_default.png)
- Remove patch (already in version) - Add upstream patch to close the file descriptor before returning Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Reviewed-by: Yann E. MORIN <yann.morin.1998@free.fr> Tested-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
26 lines
741 B
Diff
26 lines
741 B
Diff
From d2480de925e83c8bf60faa96141f4198bdf7f619 Mon Sep 17 00:00:00 2001
|
|
From: Wouter Verhelst <w@uter.be>
|
|
Date: Fri, 2 Aug 2019 10:33:00 +0200
|
|
Subject: [PATCH] Also close the file descriptor before returning
|
|
|
|
Coverity CID#1162721
|
|
[Retrieved from:
|
|
https://github.com/NetworkBlockDevice/nbd/commit/d2480de925e83c8bf60faa96141f4198bdf7f619]
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
---
|
|
nbd-client.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/nbd-client.c b/nbd-client.c
|
|
index e9ec0a86..94035886 100644
|
|
--- a/nbd-client.c
|
|
+++ b/nbd-client.c
|
|
@@ -930,6 +930,7 @@ void disconnect(char* device) {
|
|
if (ioctl(nbd, NBD_CLEAR_SOCK)<0)
|
|
err("Ioctl failed: %m\n");
|
|
printf("done\n");
|
|
+ close(nbd);
|
|
}
|
|
|
|
#if HAVE_NETLINK
|