summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2016-11-09 20:34:13 +0100
committerLubomir Rintel <lkundrak@v3.sk>2016-11-09 20:34:13 +0100
commit3d7931bbf63225f579ce743a051b5470331379c0 (patch)
tree6121554f2eb643ac29fdc55e1a2bda561e5767fc /src
parent0759f7fbdb10cd326cc0606c5f5e847583d96d5d (diff)
downloadNetworkManager-3d7931bbf63225f579ce743a051b5470331379c0.tar.gz
ifcfg-rh: fix a memory leak
Diffstat (limited to 'src')
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
index 978804f498..4987b33b62 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
@@ -1465,14 +1465,15 @@ make_ip6_setting (shvarFile *ifcfg,
method = NM_SETTING_IP6_CONFIG_METHOD_DHCP;
else {
/* IPV6_AUTOCONF=no and no IPv6 address -> method 'link-local' */
+ g_free (str_value);
str_value = svGetValueString (ifcfg, "IPV6ADDR");
if (!str_value)
str_value = svGetValueString (ifcfg, "IPV6ADDR_SECONDARIES");
if (!str_value)
method = NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL;
- g_free (str_value);
}
+ g_free (str_value);
}
/* TODO - handle other methods */