All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] 9pfs: fix fd leak in local_opendir()
@ 2017-03-03 17:52 Greg Kurz
  2017-03-03 17:54 ` Daniel P. Berrange
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kurz @ 2017-03-03 17:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eric Blake, Greg Kurz

Coverity issue CID1371731

Signed-off-by: Greg Kurz <groug@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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-03 20:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-03 17:52 [Qemu-devel] [PATCH] 9pfs: fix fd leak in local_opendir() Greg Kurz
2017-03-03 17:54 ` Daniel P. Berrange
2017-03-03 20:01   ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.