fuse_file_alloc(): fix NULL dereferences
Fix obvious NULL dereferences spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
be21f0ab0d
commit
8744969a81
@@ -55,10 +55,11 @@ struct fuse_file *fuse_file_alloc(void)
|
|||||||
if (!ff->reserved_req) {
|
if (!ff->reserved_req) {
|
||||||
kfree(ff);
|
kfree(ff);
|
||||||
ff = NULL;
|
ff = NULL;
|
||||||
}
|
} else {
|
||||||
INIT_LIST_HEAD(&ff->write_entry);
|
INIT_LIST_HEAD(&ff->write_entry);
|
||||||
atomic_set(&ff->count, 0);
|
atomic_set(&ff->count, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return ff;
|
return ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user