NOMMU: Don't try and give NULL to fput()
Subsystems (2)
PATCH 1/1 NOMMU: Don't try and give NULL to fput()
From: Gavin Lambert <[email protected]>
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 <[email protected]>
---
mm/nommu.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
mm/nommu.c +2 -1
@@ -948,7 +948,8 @@ #endifup_write (&nommu_vma_sem);kfree (vml);if (vma) { -fput (vma->vm_file); +if (vma->vm_file) +fput (vma->vm_file);kfree (vma); }return ret;