nmcli: fix some leaks found by valgrind

https://bugzilla.gnome.org/show_bug.cgi?id=709369
This commit is contained in:
Dan Winship
2013-10-03 10:08:22 -04:00
parent 00ffb78c8d
commit 0221971da5
3 changed files with 19 additions and 17 deletions

View File

@@ -696,6 +696,11 @@ nmc_empty_output_fields (NmCli *nmc)
/* Empty output_data array */
if (nmc->output_data->len > 0)
g_ptr_array_remove_range (nmc->output_data, 0, nmc->output_data->len);
if (nmc->print_fields.indices) {
g_array_free (nmc->print_fields.indices, TRUE);
nmc->print_fields.indices = NULL;
}
}
static char *