Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fcd03e0 authored by Gavin Lambert's avatar Gavin Lambert Committed by Linus Torvalds
Browse files

[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: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ab8e92ef
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -948,6 +948,7 @@ unsigned long do_mmap_pgoff(struct file *file,
	up_write(&nommu_vma_sem);
	up_write(&nommu_vma_sem);
	kfree(vml);
	kfree(vml);
	if (vma) {
	if (vma) {
		if (vma->vm_file)
			fput(vma->vm_file);
			fput(vma->vm_file);
		kfree(vma);
		kfree(vma);
	}
	}