diff options
| author | Michael Biebl <biebl@debian.org> | 2018-09-23 10:10:27 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-09-23 10:10:27 +0200 |
| commit | e126f3e804c35480c4f075777430419d6ece23da (patch) | |
| tree | 5d5821ebcda8cd6ac34d2483bb3354910e508930 /shared/nm-utils/nm-compat.c | |
| parent | c240974325c552cad177c457d6ff04e381fd77a3 (diff) | |
New upstream version 1.12.4 upstream/1.12.4
Diffstat (limited to 'shared/nm-utils/nm-compat.c')
| -rw-r--r-- | shared/nm-utils/nm-compat.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/shared/nm-utils/nm-compat.c b/shared/nm-utils/nm-compat.c index aa7c42f1..90328c06 100644 --- a/shared/nm-utils/nm-compat.c +++ b/shared/nm-utils/nm-compat.c @@ -60,8 +60,7 @@ _get_keys (NMSettingVpn *setting, if (len) { g_ptr_array_sort (a, nm_strcmp_p); g_ptr_array_add (a, NULL); - keys = g_malloc (a->len * sizeof (gpointer)); - memcpy (keys, a->pdata, a->len * sizeof (gpointer)); + keys = g_memdup (a->pdata, a->len * sizeof (gpointer)); /* we need to cache the keys *somewhere*. */ g_object_set_qdata_full (G_OBJECT (setting), |