mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
@@ -435,6 +435,7 @@ static int local_opendir(FsContext *ctx,
|
||||
|
||||
stream = fdopendir(dirfd);
|
||||
if (!stream) {
|
||||
close(dirfd);
|
||||
return -1;
|
||||
}
|
||||
fs->dir.stream = stream;
|
||||
|
||||
Reference in New Issue
Block a user