aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2019-04-03 10:57:14 -0700
committerBen Chan <benchan@chromium.org>2019-04-03 10:57:14 -0700
commit7f78ef50100f7f125ddcd47a721676d80e86d1fe (patch)
tree900a31df626fce70d3e1bf96344d6860b87fdaff
parent84fe52a1e6f1521ecc95666c5a17e37a4937b22a (diff)
via: fix memory leak in parent_setup_registration_checks_ready
This patch fixes a potential memory leak in parent_setup_registration_checks_ready() where the allocated SetupRegistrationChecksResults may be leaked when the MMIfaceModemCdma parent's setup_registration_checks() fails.
-rw-r--r--plugins/via/mm-broadband-modem-via.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/via/mm-broadband-modem-via.c b/plugins/via/mm-broadband-modem-via.c
index 1959fd95..968e62da 100644
--- a/plugins/via/mm-broadband-modem-via.c
+++ b/plugins/via/mm-broadband-modem-via.c
@@ -111,6 +111,7 @@ parent_setup_registration_checks_ready (MMIfaceModemCdma *self,
&results->skip_at_cdma1x_serving_system_step,
&results->skip_detailed_registration_state,
&error)) {
+ g_free (results);
g_task_return_error (task, error);
} else {
/* Skip +CSS */