[PATCH 2/2] simtech: fix memory leak

Ben Chan benchan at chromium.org
Sat Oct 7 01:05:36 UTC 2017


---
 plugins/simtech/mm-broadband-modem-simtech.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/plugins/simtech/mm-broadband-modem-simtech.c b/plugins/simtech/mm-broadband-modem-simtech.c
index 45cc5542..c511629e 100644
--- a/plugins/simtech/mm-broadband-modem-simtech.c
+++ b/plugins/simtech/mm-broadband-modem-simtech.c
@@ -565,6 +565,7 @@ cnmp_query_ready (MMBroadbandModemSimtech *self,
                 "Unknown acquisition order preference: '%d'",
                 ctx->acqord);
             g_object_unref (task);
+            g_free (result);
             return;
         }
         break;
@@ -589,6 +590,7 @@ cnmp_query_ready (MMBroadbandModemSimtech *self,
             "Unknown mode preference: '%d'",
             ctx->modepref);
         g_object_unref (task);
+        g_free (result);
         return;
     }
 
-- 
2.14.2.920.gcf0c67979c-goog



More information about the ModemManager-devel mailing list