diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2015-01-09 12:47:54 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2015-01-09 12:48:22 +0100 |
commit | 2edb00cbcb0ab7ad0bef82f4d7f4111f2edb75a6 (patch) | |
tree | 0dfc7cdf9fbe38a21a268b8db8d8cf31163b36eb | |
parent | 46b707f8477c2dfbf6e6b4f48c73c2d3cbf5cd12 (diff) |
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.
-rw-r--r-- | src/mm-broadband-modem-qmi.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |