summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-04-07 17:54:23 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-08 09:16:45 +0300
commite4e8176fbc76036f2576ce5864c6edc2204c1d87 (patch)
tree548844a307ed96461aa7cf14f2c9fe0961f13da5 /plugins
parent5119c432d09946864ba8179da319578750226b3b (diff)
downloadconnman-e4e8176fbc76036f2576ce5864c6edc2204c1d87.tar.gz
connman-e4e8176fbc76036f2576ce5864c6edc2204c1d87.tar.bz2
connman-e4e8176fbc76036f2576ce5864c6edc2204c1d87.zip
vpn: Free ip address before allocating a new one
Possible memory leak here as we might have ip address allocated already.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/vpn.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/vpn.c b/plugins/vpn.c
index 7a768c84..a0c6928a 100644
--- a/plugins/vpn.c
+++ b/plugins/vpn.c
@@ -395,6 +395,7 @@ static int extract_ip(DBusMessageIter *array, int family,
dbus_message_iter_next(&dict);
}
+ connman_ipaddress_free(data->ip);
data->ip = connman_ipaddress_alloc(family);
if (data->ip == NULL)
return -ENOMEM;