lscpu: fix memory leaks
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
8014104bea
commit
d4cb6a0335
|
@ -36,6 +36,7 @@ void lscpu_unref_cpu(struct lscpu_cpu *cpu)
|
|||
free(cpu->dynamic_mhz);
|
||||
free(cpu->static_mhz);
|
||||
free(cpu->mhz);
|
||||
free(cpu->bogomips);
|
||||
free(cpu);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,10 +74,12 @@ void lscpu_unref_cputype(struct lscpu_cputype *ct)
|
|||
DBG(TYPE, ul_debugobj(ct, " freeing %s/%s", ct->vendor, ct->model));
|
||||
lscpu_cputype_free_topology(ct);
|
||||
free(ct->vendor);
|
||||
free(ct->bios_vendor);
|
||||
free(ct->machinetype); /* s390 */
|
||||
free(ct->family);
|
||||
free(ct->model);
|
||||
free(ct->modelname);
|
||||
free(ct->bios_modelname);
|
||||
free(ct->revision); /* alternative for model (ppc) */
|
||||
free(ct->stepping);
|
||||
free(ct->bogomips);
|
||||
|
|
|
@ -917,6 +917,7 @@ static void print_summary(struct lscpu_cxt *cxt)
|
|||
scols_symbols_set_vertical(sy, " ");
|
||||
scols_symbols_set_right(sy, " ");
|
||||
scols_table_set_symbols(tb, sy);
|
||||
scols_unref_symbols(sy);
|
||||
}
|
||||
|
||||
if (scols_table_new_column(tb, "field", 0, is_term ? SCOLS_FL_TREE : 0) == NULL ||
|
||||
|
|
Loading…
Reference in New Issue