[PATCH] anydata: remove unused 'port' field in DetailedRegistrationStateContext

Ben Chan benchan at chromium.org
Sat Oct 7 04:09:43 UTC 2017


The 'port' field in DetailedRegistrationStateContext is initialized to
NULL but never updated or used.

When detailed_registration_state_context_complete_and_free() calls
g_object_unref() on the NULL 'port' field, an assertion is raised.
---
 plugins/anydata/mm-broadband-modem-anydata.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/plugins/anydata/mm-broadband-modem-anydata.c b/plugins/anydata/mm-broadband-modem-anydata.c
index 4a1da0f9..4b579da1 100644
--- a/plugins/anydata/mm-broadband-modem-anydata.c
+++ b/plugins/anydata/mm-broadband-modem-anydata.c
@@ -50,7 +50,6 @@ typedef struct {
 typedef struct {
     MMBroadbandModem *self;
     GSimpleAsyncResult *result;
-    MMPortSerialAt *port;
     MMModemCdmaRegistrationState cdma1x_state;
     MMModemCdmaRegistrationState evdo_state;
     GError *error;
@@ -71,7 +70,6 @@ detailed_registration_state_context_complete_and_free (DetailedRegistrationState
     }
 
     g_simple_async_result_complete (ctx->result);
-    g_object_unref (ctx->port);
     g_object_unref (ctx->result);
     g_object_unref (ctx->self);
     g_free (ctx);
-- 
2.14.2.920.gcf0c67979c-goog



More information about the ModemManager-devel mailing list