In grub_cmd_initrd(), initrd_ctx is allocated before calling
grub_relocator_alloc_chunk_align(). When that function fails,
initrd_ctx should be freed before exiting grub_cmd_initrd().
Fixes: CID 473852
Signed-off-by: Lidong Chen
---
grub-core/loader/i386/linux.c | 5 -
1 file changed, 4 ins
Fix memory leaks in make_vg() with new helper functions, free_pv()
and free_lv(). Additionally, correct a check after allocating
comp->segments->nodes that mistakenly checked lv->segments->nodes
instead, likely due to a copy-paste error.
Fixes: CID 473878
Fixes: CID 473884
Fixes: CID 473889
Fixes:
Fix memory leaks in grub_btrfs_extent_read() and
grub_btrfs_dir().
Fixes: CID 473842
Fixes: CID 473871
Signed-off-by: Lidong Chen
---
grub-core/fs/btrfs.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index 9c1e925c9..7bf8d9
These patches address memory leaks identified by Coverity.
Lidong Chen (5):
disk/ldm: Fix memory leaks
lib/reloacator: Fix memory leaks
loader/i386/linux: Fix resource leak
fs/btrfs: Fix memory leaks
loader/xnu: Fix memory leak
grub-core/disk/ldm.c | 180 +++---
Fix memory leaks in grub_relocator_alloc_chunk_align().
Fixes: CID 473844
Signed-off-by: Lidong Chen
---
grub-core/lib/relocator.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c
index e0478ae5b..3306a1bb7 100644
---
In grub_xnu_load_kext_from_dir(), when the call to grub_device_open()
failed, it simply cleaned up previously allocated memory and returned
GRUB_ERR_NONE. However, it neglected to free ctx->newdirname which is
allocated before the call to grub_device_open().
Fixes: CID 473859
Signed-off-by: Lidon
> On Feb 28, 2025, at 7:57 AM, Andrew Hamilton wrote:
>
> Yes that sounds great, I am back from vacation just now so will be generally
> free any time between 0800 and 2100 Central Standard Time.
I’m mostly available from 9am PT onward.
Thanks,
Lidong
>
> Thanks,
> Andrew
> On Fri, Feb 28,
The test corpus for version-1 RAID generated an infinite recursion
in grub_partition_iterate() while attempting to read the superblock.
The reason for the issue was that the data region overlapped with
the superblock.
The infinite call loop looks like this:
grub_partition_iterate() -> partmap->ite