mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 02:10:09 +01:00
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: 396dc2b3b4
This commit is contained in:
parent
c0138fa7e7
commit
54d10f0ec1
1 changed files with 0 additions and 5 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue