From 2edb00cbcb0ab7ad0bef82f4d7f4111f2edb75a6 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 9 Jan 2015 12:47:54 +0100 Subject: 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. --- src/mm-broadband-modem-qmi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index 849bf923..d43b71a1 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -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); -- cgit v1.2.3-70-g09d2