From e4e8176fbc76036f2576ce5864c6edc2204c1d87 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Sun, 7 Apr 2013 17:54:23 +0300 Subject: vpn: Free ip address before allocating a new one Possible memory leak here as we might have ip address allocated already. --- plugins/vpn.c | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') 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; -- cgit v1.2.3