UBIFS: fix oops on error path in read_pnode
commit6883e53afcda1cc1576f3bbb1e9d6dbe4012db4c
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 25 Mar 2011 17:09:54 +0000 (25 19:09 +0200)
committerAndi Kleen <ak@linux.intel.com>
Thu, 28 Apr 2011 15:20:53 +0000 (28 08:20 -0700)
treed499cbadb307d00497b63a1c8205814639b19f01
parent83d20f1306dc5ce76f195917dead2ce30351d2fb
UBIFS: fix oops on error path in read_pnode

commit 54acbaaa523ca0bd284a18f67ad213c379679e86 upstream.

Thanks to coverity which spotted that UBIFS will oops if 'kmalloc()'
in 'read_pnode()' fails and we dereference a NULL 'pnode' pointer
when we 'goto out'.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
fs/ubifs/lpt.c