diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2019-01-25 10:52:15 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2019-01-25 11:24:27 +0100 |
| commit | e8ac7dacdcf4b38addef4f8ac6ab038f9d29582c (patch) | |
| tree | 017883e210043859ee695250f6285380b795f8e4 /debian/patches/cli-fix-memory-leaks.patch | |
| parent | b05c072fe2594e0369cbfb00a3fba176d2d309dc (diff) | |
| parent | 1b878e595ff7be634a4800ca6cc506046e49548e (diff) | |
Merge remote-tracking branch 'salsa/master' into disco
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); + } + + /*****************************************************************************/ |