From 4341368dec4635a0e438cad6d15a14bd6444e0fb Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 1 Feb 2017 10:37:32 +0100 Subject: qmi-firmware-update: plug several memleaks --- src/qmi-firmware-update/qfu-image-cwe.c | 1 + src/qmi-firmware-update/qfu-updater.c | 2 ++ src/qmi-firmware-update/qfu-utils.c | 1 + 3 files changed, 4 insertions(+) diff --git a/src/qmi-firmware-update/qfu-image-cwe.c b/src/qmi-firmware-update/qfu-image-cwe.c index f76afda..06549c8 100644 --- a/src/qmi-firmware-update/qfu-image-cwe.c +++ b/src/qmi-firmware-update/qfu-image-cwe.c @@ -466,6 +466,7 @@ load_image_info (QfuImageCwe *self, g_debug ("[qfu-image-cwe] %simage at offset %" G_GOFFSET_FORMAT " is valid", parent_prefix, tested_offset); walker = g_seekable_tell (G_SEEKABLE (input_stream)); } + g_free (image_prefix); /* Finally, seek to just after this image */ if (!g_seekable_seek (G_SEEKABLE (input_stream), image_end_offset, G_SEEK_SET, cancellable, error)) { diff --git a/src/qmi-firmware-update/qfu-updater.c b/src/qmi-firmware-update/qfu-updater.c index 5299836..229b56d 100644 --- a/src/qmi-firmware-update/qfu-updater.c +++ b/src/qmi-firmware-update/qfu-updater.c @@ -980,6 +980,8 @@ run_context_step_set_firmware_preference (GTask *task) g_free (modem_image_id.build_id); g_array_unref (pri_image_id.unique_id); g_free (pri_image_id.build_id); + + qmi_message_dms_set_firmware_preference_input_unref (input); } static gboolean diff --git a/src/qmi-firmware-update/qfu-utils.c b/src/qmi-firmware-update/qfu-utils.c index ba24a0b..9977f1f 100644 --- a/src/qmi-firmware-update/qfu-utils.c +++ b/src/qmi-firmware-update/qfu-utils.c @@ -661,6 +661,7 @@ power_cycle_step_ready (QmiClientDms *qmi_client, } g_debug ("[qfu,utils] operating mode set successfully..."); + qmi_message_dms_set_operating_mode_output_unref (output); /* Go on */ ctx->step++; -- cgit v1.1