mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06: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:
parent
b7361d46e7
commit
faab207f11
1 changed files with 1 additions and 0 deletions
|
@ -435,6 +435,7 @@ static int local_opendir(FsContext *ctx,
|
|||
|
||||
stream = fdopendir(dirfd);
|
||||
if (!stream) {
|
||||
close(dirfd);
|
||||
return -1;
|
||||
}
|
||||
fs->dir.stream = stream;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue