OSDN Git Service

ubifs: Fix memory leak in lprobs self-check
authorRichard Weinberger <richard@nod.at>
Tue, 12 Jun 2018 18:49:45 +0000 (20:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Sep 2018 18:04:35 +0000 (20:04 +0200)
commit20da15a755e8c68194ed777813277daf4931147e
tree5862d2ca6877acf1c5b31097a74764c9e7229d38
parent3d4c43c8f0fb00ad5f58c06b382dc2dc769a63e1
ubifs: Fix memory leak in lprobs self-check

commit eef19816ada3abd56d9f20c88794cc2fea83ebb2 upstream.

Allocate the buffer after we return early.
Otherwise memory is being leaked.

Cc: <stable@vger.kernel.org>
Fixes: 1e51764a3c2a ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ubifs/lprops.c