fs/btrfs: Fix memory leak in find_path()

Fixes: 82591fa6e (Make / in btrfs refer to real root)

Signed-off-by: t.feng <fengtao40@huawei.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
t.feng 2022-11-29 17:14:08 +08:00 committed by Daniel Kiper
parent 022365aeaa
commit 3b49391bc5

View File

@ -1982,7 +1982,12 @@ find_path (struct grub_btrfs_data *data,
{
err = get_root (data, key, tree, type);
if (err)
return err;
{
grub_free (direl);
grub_free (path_alloc);
grub_free (origpath);
return err;
}
}
continue;
}