mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
UPSTREAM: ANDROID: fuse-bpf: fix fuse_create_open_finalize
If we hit an error during fuse_create_open, some variables will be undefined during the finalize, so check that they were actually initialized before accessing. Bug: 217570523 Test: attempt to over fill disk Signed-off-by: Daniel Rosenberg <drosen@google.com> Change-Id: I094564b83e49eec2a6bac5bd050b4f7327b0c979
This commit is contained in:
parent
37966b8d24
commit
2e4df81c63
1 changed files with 4 additions and 2 deletions
|
|
@ -339,8 +339,10 @@ void *fuse_create_open_finalize(
|
|||
struct fuse_entry_out *feo = fa->out_args[0].value;
|
||||
struct fuse_open_out *foo = fa->out_args[1].value;
|
||||
|
||||
fi->nodeid = feo->nodeid;
|
||||
ff->fh = foo->fh;
|
||||
if (fi)
|
||||
fi->nodeid = feo->nodeid;
|
||||
if (ff)
|
||||
ff->fh = foo->fh;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue