diff options
author | Greg Kurz <groug@kaod.org> | 2017-03-06 17:34:01 +0100 |
---|---|---|
committer | Greg Kurz <groug@kaod.org> | 2017-03-06 17:34:01 +0100 |
commit | faab207f115cf9738f110cb088ab35a4b7aef73a (patch) | |
tree | d4ff2ee02e8b62d6d6bcb5d5c5c1f4c0081062e9 /hw | |
parent | b7361d46e75f12d8d943ca8d33ef82cafce39920 (diff) |
9pfs: fix fd leak in local_opendir()
Coverity issue CID1371731
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/9pfs/9p-local.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 5db7104334..09f6a46d61 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; |