about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPaul Fariello <paul@fariello.eu>2019-03-27 15:52:48 +0100
committerPaul Fariello <paul@fariello.eu>2019-04-10 17:23:45 +0200
commit075d4cf35b4fce6d623822a63ae0abfbfc78b965 (patch)
tree7a9c3ca72fa08bc0ed1ab40fec31e7cd232c1115
parent2015ba201d446a181c240f4cc957b99af4d9ba1d (diff)
downloadprofani-tty-075d4cf35b4fce6d623822a63ae0abfbfc78b965.tar.gz
Don't use glib 2.58 func
-rw-r--r--src/omemo/omemo.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/omemo/omemo.c b/src/omemo/omemo.c
index 1f48224e..1efe0296 100644
--- a/src/omemo/omemo.c
+++ b/src/omemo/omemo.c
@@ -1082,9 +1082,7 @@ static gboolean
 handle_own_device_list(const char *const jid, GList *device_list)
 {
     if (!g_list_find(device_list, GINT_TO_POINTER(omemo_ctx.device_id))) {
-        gpointer original_jid;
-        g_hash_table_steal_extended(omemo_ctx.device_list, jid, &original_jid, NULL);
-        free(original_jid);
+        device_list = g_list_copy(device_list);
         device_list = g_list_append(device_list, GINT_TO_POINTER(omemo_ctx.device_id));
         g_hash_table_insert(omemo_ctx.device_list, strdup(jid), device_list);
         omemo_devicelist_publish(device_list);