]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
exfat: fix memory leak in exfat_load_bitmap()
authorYuezhang Mo <Yuezhang.Mo@sony.com>
Tue, 3 Sep 2024 07:01:09 +0000 (15:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:38 +0000 (15:11 +0200)
commitddf704c2ce3b73f38d2dd8cf1bb0f7ec038bdf63
tree872c845779bf95d697a702a96a95138d34a095dd
parentf47b1d5e596a4a05c51347be7dbb9880242b3e5b
exfat: fix memory leak in exfat_load_bitmap()

commit d2b537b3e533f28e0d97293fe9293161fe8cd137 upstream.

If the first directory entry in the root directory is not a bitmap
directory entry, 'bh' will not be released and reassigned, which
will cause a memory leak.

Fixes: 1e49a94cf707 ("exfat: add bitmap operations")
Cc: stable@vger.kernel.org
Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/exfat/balloc.c