about summary refs log tree commit diff
path: root/shared/nm-utils/nm-compat.c
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2019-01-25 10:49:37 +0100
committerSebastien Bacher <seb128@ubuntu.com>2019-01-25 10:49:37 +0100
commit404ebe62622150e77e311777dff8617eb974e834 (patch)
treecc7f73d3e435d5b3ee85e2bef833e8de1fb133e3 /shared/nm-utils/nm-compat.c
parent227c401a10a930af6fd5f123aef345fcd130d6aa (diff)
parent3626b425d1bc017fdc6f1ea0cfd329d1e1681641 (diff)
Merge remote-tracking branch 'salsa/upstream' into upstream
Diffstat (limited to 'shared/nm-utils/nm-compat.c')
-rw-r--r--shared/nm-utils/nm-compat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/nm-utils/nm-compat.c b/shared/nm-utils/nm-compat.c
index 90328c06..aa7c42f1 100644
--- a/shared/nm-utils/nm-compat.c
+++ b/shared/nm-utils/nm-compat.c
@@ -60,7 +60,8 @@ _get_keys (NMSettingVpn *setting,
 	if (len) {
 		g_ptr_array_sort (a, nm_strcmp_p);
 		g_ptr_array_add (a, NULL);
-		keys = g_memdup (a->pdata, a->len * sizeof (gpointer));
+		keys = g_malloc (a->len * sizeof (gpointer));
+		memcpy (keys, a->pdata, a->len * sizeof (gpointer));
 
 		/* we need to cache the keys *somewhere*. */
 		g_object_set_qdata_full (G_OBJECT (setting),