summaryrefslogtreecommitdiff
path: root/profiles/deviceinfo
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-01-06 12:50:33 -0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-01-06 12:58:39 -0800
commitcfab569484b18407fc117bb96634525cc76ea1f5 (patch)
tree754ec37148cc95958f1657e25768ad69565ebf23 /profiles/deviceinfo
parent9f09e69ecb077082301dafb745856e1f3731aaa7 (diff)
downloadbluez-cfab569484b18407fc117bb96634525cc76ea1f5.tar.gz
build: Replace use of g_memdup with util_memdup
This replaces the uses of g_memdup with util_memdup since the former has been deprecated: warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead [-Wdeprecated-declarations] g_memdup2 requires bumping glib version which would likely have its own problems thus why util_memdup was introduced.
Diffstat (limited to 'profiles/deviceinfo')
-rw-r--r--profiles/deviceinfo/dis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/profiles/deviceinfo/dis.c b/profiles/deviceinfo/dis.c
index 87fa63306..f660179ed 100644
--- a/profiles/deviceinfo/dis.c
+++ b/profiles/deviceinfo/dis.c
@@ -72,7 +72,7 @@ static void dis_free(struct bt_dis *dis)
{
bt_dis_detach(dis);
- g_free(dis->primary);
+ free(dis->primary);
queue_destroy(dis->gatt_op, (void *) destroy_gatt_req);
g_free(dis);
}
@@ -143,7 +143,7 @@ struct bt_dis *bt_dis_new_primary(void *primary)
dis->gatt_op = queue_new();
if (primary)
- dis->primary = g_memdup(primary, sizeof(*dis->primary));
+ dis->primary = util_memdup(primary, sizeof(*dis->primary));
return bt_dis_ref(dis);
}