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
@ -435,6 +435,7 @@ static int local_opendir(FsContext *ctx,
|
||||
|
||||
stream = fdopendir(dirfd);
|
||||
if (!stream) {
|
||||
close(dirfd);
|
||||
return -1;
|
||||
}
|
||||
fs->dir.stream = stream;
|
||||
|
Loading…
Reference in New Issue
Block a user