9pfs: fix fd leak in local_opendir()
PATCH 1/1 9pfs: fix fd leak in local_opendir()
Coverity issue CID1371731
Signed-off-by Greg Kurz <[email protected]>
--- hw/9pfs/9p-local.c | 1 + 1 file changed, 1 insertion(+)
hw/9pfs/9p-local.c +1 -0
@@ -435,6 +435,7 @@ static int local_opendir(FsContext *ctx, stream =fdopendir (dirfd);if (!stream) { +close (dirfd);return -1 ; } fs->dir.stream = stream;
Quoted 12 lines · Greg Kurz
Coverity issue CID1371731
Signed-off-by Greg Kurz <[email protected]>--- hw/9pfs/9p-local.c | 1 + 1 file changed, 1 insertion(+)hw/9pfs/9p-local.c +0
-0
hw/9pfs/9p-local.c static int local_opendir(FsContext *ctx, · line 441
Quoted 7 lines
hw/9pfs/9p-local.c +1
-0@@ -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 <[email protected]>
Regards,
Daniel
Signature · 3 lines
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
Philippe Mathieu-Daudé
Reviewed-byQuoted 23 lines · Daniel P. Berrange
Quoted 12 lines · Greg Kurz
Coverity issue CID1371731
Signed-off-by Greg Kurz <[email protected]>--- hw/9pfs/9p-local.c | 1 + 1 file changed, 1 insertion(+)hw/9pfs/9p-local.c +0
-0hw/9pfs/9p-local.c static int local_opendir(FsContext *ctx, · line 441
Quoted 7 lines
hw/9pfs/9p-local.c +1
-0@@ -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 <[email protected]>
Quoted 3 lines
Regards,
Daniel
Reviewed-by Philippe Mathieu-Daudé <[email protected]>