summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-11-10 09:00:31 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2017-11-10 15:07:57 +0100
commit99013e020b12236447227911fc14b4dc0840d2cf (patch)
treeb5261f77e43830b7113c5359fb21e2538325c519
parent364c88db6e61d42671c86b82a7a0401d81afa13a (diff)
downloadNetworkManager-99013e020b12236447227911fc14b4dc0840d2cf.tar.gz
ofono: fix leaks in context_property_changed()
-rw-r--r--src/devices/wwan/nm-modem-ofono.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/devices/wwan/nm-modem-ofono.c b/src/devices/wwan/nm-modem-ofono.c
index 8b3fc2e883..7e9a4c97cd 100644
--- a/src/devices/wwan/nm-modem-ofono.c
+++ b/src/devices/wwan/nm-modem-ofono.c
@@ -829,7 +829,7 @@ context_property_changed (GDBusProxy *proxy,
NMModemOfonoPrivate *priv = NM_MODEM_OFONO_GET_PRIVATE (self);
NMPlatformIP4Address addr;
gboolean ret = FALSE;
- GVariant *v_dict;
+ gs_unref_variant GVariant *v_dict = NULL;
const gchar *s, *addr_s;
const gchar **array, **iter;
guint32 address_network, gateway_network;
@@ -859,14 +859,13 @@ context_property_changed (GDBusProxy *proxy,
if (s && strlen (s)) {
_LOGD ("Interface: %s", s);
g_object_set (self,
- NM_MODEM_DATA_PORT, g_strdup (s),
+ NM_MODEM_DATA_PORT, s,
NM_MODEM_IP4_METHOD, NM_MODEM_IP_METHOD_STATIC,
NULL);
} else {
_LOGW ("Settings 'Interface'; empty");
goto out;
}
-
} else {
_LOGW ("Settings 'Interface' missing");
goto out;