Fixes coverity (CID 1642024)
Cc: Aditya Gupta <[email protected]>
Cc: Harsh Prateek Bora <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/CAFEAcA_Bm52bkPi9MH_uugXRR5fj48RtpbOnPNFQtbX=7mz...@mail.gmail.com/
Reported-by: Peter Maydell <[email protected]>
Suggested-by: Peter Maydell <[email protected]>
Signed-off-by: Shivang Upadhyay <[email protected]>
---
hw/ppc/spapr_fadump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_fadump.c b/hw/ppc/spapr_fadump.c
index 883a60cdcf..49d2f862a1 100644
--- a/hw/ppc/spapr_fadump.c
+++ b/hw/ppc/spapr_fadump.c
@@ -453,7 +453,7 @@ static FadumpRegEntry *populate_cpu_reg_entries(CPUState
*cpu,
static void *get_cpu_state_data(uint64_t *cpu_state_len)
{
FadumpRegSaveAreaHeader reg_save_hdr;
- FadumpRegEntry *reg_entries;
+ g_autofree FadumpRegEntry *reg_entries;
FadumpRegEntry *curr_reg_entry;
CPUState *cpu;
--
2.51.0