Skip to contentSkip to conversation

spapr: fix leak of rev array

PATCH Applied Emilio G. Cota 3 participants 3 messages Aug 24, 2018 – Aug 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spapr: fix leak of rev array

Introduced in 04d595b300 ("spapr: do not use CPU_FOREACH_REVERSE", 2018-08-23)

---
 hw/ppc/spapr.c | 1 +
 1 file changed, 1 insertion(+)
hw/ppc/spapr.c +1 -0
index 4edb6c7d16..505d4c84e5 100644
@@ -607,6 +607,7 @@ static void spapr_populate_cpus_dt_node(void *fdt, sPAPRMachineState *spapr)
         spapr_populate_cpu_dt(cs, fdt, offset, spapr);
     }
 
+    g_free(rev);
 }
 
 static uint32_t spapr_pc_dimm_node(MemoryDeviceInfoList *list, ram_addr_t addr)
Signature · 1 line
2.17.1
Applied
#2 lore raw
In reply to Emilio G. Cota
Quoted 15 lines · Emilio G. Cota

Introduced in 04d595b300 ("spapr: do not use CPU_FOREACH_REVERSE", 2018-08-23)

---
 hw/ppc/spapr.c | 1 +
 1 file changed, 1 insertion(+)
hw/ppc/spapr.c +0 -0
index 4edb6c7d16..505d4c84e5 100644

hw/ppc/spapr.c static void spapr_populate_cpus_dt_node(void *fdt, sPAPRMachineState *spapr) · line 613

Quoted 7 lines
hw/ppc/spapr.c +1 -0
@@ -607,6 +607,7 @@ static void spapr_populate_cpus_dt_node(void *fdt, sPAPRMachineState *spapr)
         spapr_populate_cpu_dt(cs, fdt, offset, spapr);
     }
 
+    g_free(rev);
 }
 
 static uint32_t spapr_pc_dimm_node(MemoryDeviceInfoList *list, ram_addr_t addr)

Applied, thanks.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson