broadband-modem-qmi: fix memleak when listing SMS

If we get multiple message lists, we need to make sure the previous one is
cleared out before going to the next one.
This commit is contained in:
Aleksander Morgado
2015-01-09 12:47:54 +01:00
parent 46b707f847
commit 2edb00cbcb

View File

@@ -7094,6 +7094,8 @@ wms_list_messages_ready (QmiClientWms *client,
NULL);
/* Keep a reference to the array ourselves */
if (ctx->message_array)
g_array_unref (ctx->message_array);
ctx->message_array = g_array_ref (message_array);
qmi_message_wms_list_messages_output_unref (output);