From bda7b9a74a73429b9b48a259450274746ab3f44f Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 26 Sep 2017 13:05:03 +0200 Subject: [PATCH] ublox: plug memleak when parsing UAUTHREQ test --- plugins/ublox/mm-modem-helpers-ublox.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/ublox/mm-modem-helpers-ublox.c b/plugins/ublox/mm-modem-helpers-ublox.c index d31b94ac..b0b4bf3e 100644 --- a/plugins/ublox/mm-modem-helpers-ublox.c +++ b/plugins/ublox/mm-modem-helpers-ublox.c @@ -1362,9 +1362,10 @@ mm_ublox_parse_uauthreq_test (const char *response, out: g_strfreev (split); + if (allowed_auths) + g_array_unref (allowed_auths); + if (inner_error) { - if (allowed_auths) - g_array_unref (allowed_auths); g_propagate_error (error, inner_error); return MM_UBLOX_BEARER_ALLOWED_AUTH_UNKNOWN; }