cli: fix memory leaks
This commit is contained in:
@@ -2822,7 +2822,7 @@ show_access_point_info (NMDeviceWifi *wifi, NmCli *nmc, NmcOutputData *out)
|
||||
|
||||
aps = sort_access_points (nm_device_wifi_get_access_points (wifi));
|
||||
g_ptr_array_foreach (aps, fill_output_access_point, &info);
|
||||
g_ptr_array_free (aps, FALSE);
|
||||
g_ptr_array_free (aps, TRUE);
|
||||
}
|
||||
|
||||
print_data_prepare_width (out->output_data);
|
||||
|
@@ -920,6 +920,8 @@ nmc_empty_output_fields (NmcOutputData *output_data)
|
||||
/* Empty output_data array */
|
||||
if (output_data->output_data->len > 0)
|
||||
g_ptr_array_remove_range (output_data->output_data, 0, output_data->output_data->len);
|
||||
|
||||
g_ptr_array_unref (output_data->output_data);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
Reference in New Issue
Block a user