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 17:56:00 +0000 (19:56 +0200)
commita230db38a9fd9b422bb7f114da9bb7141c87fded
treee23da3d471926beef7f62ecfc64d884e3a8c3df6
parent656d6e6f6d235fe3e349a331ec2d8c5105df721e
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