[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: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
ab8e92efcf
commit
3fcd03e070
|
@ -948,6 +948,7 @@ unsigned long do_mmap_pgoff(struct file *file,
|
|||
up_write(&nommu_vma_sem);
|
||||
kfree(vml);
|
||||
if (vma) {
|
||||
if (vma->vm_file)
|
||||
fput(vma->vm_file);
|
||||
kfree(vma);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue