mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
ppc/amigaone: Free allocated struct
In create_bd_info function a bd_info struct is allocated but never
freed. Mark it g_autofree to avoid leaking it.
Fixes: 34f053d86b (ppc/amigaone: Add kernel and initrd support)
Resolves: Coverity CID 1641398
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Link: https://lore.kernel.org/qemu-devel/20251022211649.9A09E5972E5@zero.eik.bme.hu
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
This commit is contained in:
+1
-1
@@ -221,7 +221,7 @@ struct bd_info {
|
||||
|
||||
static void create_bd_info(hwaddr addr, ram_addr_t ram_size)
|
||||
{
|
||||
struct bd_info *bd = g_new0(struct bd_info, 1);
|
||||
g_autofree struct bd_info *bd = g_new0(struct bd_info, 1);
|
||||
|
||||
bd->bi_memsize = cpu_to_be32(ram_size);
|
||||
bd->bi_flashstart = cpu_to_be32(PROM_ADDR);
|
||||
|
||||
Reference in New Issue
Block a user