diff options
author | Gavin Lambert <gavinl@compacsort.com> | 2006-09-30 23:27:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 00:39:17 -0700 |
commit | 3fcd03e07008ec0f667dfb7626171165699ea5c2 (patch) | |
tree | 311370abb953013b7ffa458b63b376706560061e /mm/nommu.c | |
parent | ab8e92efcf3f7972f30033cad75f180aef4f3abc (diff) | |
download | kernel_samsung_smdk4412-3fcd03e07008ec0f667dfb7626171165699ea5c2.tar.gz kernel_samsung_smdk4412-3fcd03e07008ec0f667dfb7626171165699ea5c2.tar.bz2 kernel_samsung_smdk4412-3fcd03e07008ec0f667dfb7626171165699ea5c2.zip |
[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>
Diffstat (limited to 'mm/nommu.c')
-rw-r--r-- | mm/nommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index 56454066219..365019599df 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -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; |