about summary refs log tree commit diff
path: root/shared/nm-utils/nm-compat.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-10-21 03:00:34 +0200
committerMichael Biebl <biebl@debian.org>2018-10-21 03:00:34 +0200
commit1f85f9683a41ca116af20fd19940576040303080 (patch)
tree54c4ac337fe0b0091772b7ef6a22c715dd985fab /shared/nm-utils/nm-compat.c
parenteca0cfe89a2a7ec88abe9c03075160f46b338137 (diff)
parent5554398639fa9e344bd12205a64874e6436b936e (diff)
Merge branch 'experimental'
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),