diff options
| author | Michael Biebl <biebl@debian.org> | 2018-11-05 16:02:16 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-11-05 16:05:39 +0100 |
| commit | 61ea65bd230e95b1d7a8a35064e7b1abf9c8c8db (patch) | |
| tree | 74a82b0b3a1b7985ac2063e7a0f1accbc34e3999 /debian/patches/cli-fix-memory-leaks.patch | |
| parent | 3cdef184c37fa2c152f8542c6107f8a623735a1c (diff) | |
cli: wait for all wifi scans to finish before displaying the result
Otherwise devices are displayed in an inconsistent order. Replaces debian/patches/Ignore-client-tests-failures.patch.
Diffstat (limited to 'debian/patches/cli-fix-memory-leaks.patch')
| -rw-r--r-- | debian/patches/cli-fix-memory-leaks.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/cli-fix-memory-leaks.patch b/debian/patches/cli-fix-memory-leaks.patch new file mode 100644 index 00000000..457a7f85 --- /dev/null +++ b/debian/patches/cli-fix-memory-leaks.patch @@ -0,0 +1,37 @@ +From: Beniamino Galvani <bgalvani@redhat.com> +Date: Wed, 31 Oct 2018 10:10:10 +0100 +Subject: cli: fix memory leaks + +(cherry picked from commit a985efaf934cedd37a69f94cd35990d7e2c43f0b) +(cherry picked from commit e22602096fe60fd73586bf041863b63aad84bbee) +--- + clients/cli/devices.c | 2 +- + clients/cli/utils.c | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/clients/cli/devices.c b/clients/cli/devices.c +index 38e24e7..b7ba50f 100644 +--- a/clients/cli/devices.c ++++ b/clients/cli/devices.c +@@ -2795,7 +2795,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); +diff --git a/clients/cli/utils.c b/clients/cli/utils.c +index e21c108..feb6722 100644 +--- a/clients/cli/utils.c ++++ b/clients/cli/utils.c +@@ -919,6 +919,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); + } + + /*****************************************************************************/ |