libmm-glib: use g_list_copy_deep for deep copying a GList
This commit is contained in:
committed by
Aleksander Morgado
parent
8ad785925a
commit
2327ebddf1
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user