On 03/03/2017 02:54 PM, Daniel P. Berrange wrote:
On Fri, Mar 03, 2017 at 06:52:42PM +0100, Greg Kurz wrote:
Coverity issue CID1371731

Signed-off-by: Greg Kurz <gr...@kaod.org>
---
 hw/9pfs/9p-local.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index e31309a29c58..fe930300445a 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -435,6 +435,7 @@ static int local_opendir(FsContext *ctx,

     stream = fdopendir(dirfd);
     if (!stream) {
+        close(dirfd);
         return -1;
     }
     fs->dir.stream = stream;

Reviewed-by: Daniel P. Berrange <berra...@redhat.com>

Regards,
Daniel


Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>

Reply via email to