From 54d10f0ec1af3a2ba2a95608703bebba4d04b638 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 5 Aug 2015 17:40:07 +0200 Subject: [PATCH] device: fix memory leak in act_stage3_ip6_config_start() If linklocal6_start() finds that the device already has an IPv6 link-local address and returns NM_ACT_STAGE_RETURN_FINISH, we don't need to fill @out_config with an empty configuration. A non-NULL @out_config is required only for ret = NM_ACT_STAGE_RETURN_SUCCESS. Fixes: 396dc2b3b40f9b33e9c55f8e72bb192739983476 --- src/devices/nm-device.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 78c9e14a43..f3f4962c7e 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -5203,11 +5203,6 @@ act_stage3_ip6_config_start (NMDevice *self, ret = NM_ACT_STAGE_RETURN_POSTPONE; } else if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL) == 0) { ret = linklocal6_start (self); - if (ret == NM_ACT_STAGE_RETURN_FINISH) { - /* New blank config; LL address is already in priv->ext_ip6_config */ - *out_config = nm_ip6_config_new (nm_device_get_ip_ifindex (self)); - g_assert (*out_config); - } } else if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_DHCP) == 0) { priv->dhcp6_mode = NM_RDISC_DHCP_LEVEL_MANAGED; if (!dhcp6_start (self, TRUE, reason)) {