libmm-glib: use g_list_copy_deep for deep copying a GList

This commit is contained in:
Ben Chan
2017-06-23 22:32:07 +02:00
committed by Aleksander Morgado
parent 8ad785925a
commit 2327ebddf1
3 changed files with 3 additions and 6 deletions
+1 -2
View File
@@ -273,8 +273,7 @@ mm_modem_messaging_list_finish (MMModemMessaging *self,
/* The list we got, including the objects within, is owned by the async result;
* so we'll make sure we return a new list */
g_list_foreach (list, (GFunc)g_object_ref, NULL);
return g_list_copy (list);
return g_list_copy_deep (list, (GCopyFunc)g_object_ref, NULL);
}
static void create_next_sms (ListSmsContext *ctx);
+1 -2
View File
@@ -138,8 +138,7 @@ mm_modem_voice_list_calls_finish (MMModemVoice *self,
/* The list we got, including the objects within, is owned by the async result;
* so we'll make sure we return a new list */
g_list_foreach (list, (GFunc)g_object_ref, NULL);
return g_list_copy (list);
return g_list_copy_deep (list, (GCopyFunc)g_object_ref, NULL);
}
static void create_next_call (ListCallsContext *ctx);
+1 -2
View File
@@ -1806,8 +1806,7 @@ mm_modem_list_bearers_finish (MMModem *self,
/* The list we got, including the objects within, is owned by the async result;
* so we'll make sure we return a new list */
g_list_foreach (list, (GFunc)g_object_ref, NULL);
return g_list_copy (list);
return g_list_copy_deep (list, (GCopyFunc)g_object_ref, NULL);
}
static void create_next_bearer (ListBearersContext *ctx);