提交 3fcd03e0 编写于 作者: G Gavin Lambert 提交者: Linus Torvalds

[PATCH] NOMMU: don't try and give NULL to fput()

Don't try and give NULL to fput() in the error handling in do_mmap_pgoff()
as it'll cause an oops.
Signed-off-by: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 ab8e92ef
......@@ -948,7 +948,8 @@ unsigned long do_mmap_pgoff(struct file *file,
up_write(&nommu_vma_sem);
kfree(vml);
if (vma) {
fput(vma->vm_file);
if (vma->vm_file)
fput(vma->vm_file);
kfree(vma);
}
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册