mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 03:10:10 +01:00
core: fix potential use-after-free resetting IPv6 accept_ra value
This commit is contained in:
parent
4eea398b06
commit
c38d1c28ff
1 changed files with 7 additions and 7 deletions
|
|
@ -3332,13 +3332,6 @@ dispose (GObject *object)
|
|||
addrconf6_cleanup (self);
|
||||
dnsmasq_cleanup (self);
|
||||
|
||||
/* reset the saved RA value */
|
||||
if (priv->ip6_accept_ra_path) {
|
||||
nm_utils_do_sysctl (priv->ip6_accept_ra_path,
|
||||
priv->ip6_accept_ra_save ? "1\n" : "0\n");
|
||||
}
|
||||
g_free (priv->ip6_accept_ra_path);
|
||||
|
||||
/* Take the device itself down and clear its IPv4 configuration */
|
||||
if (priv->managed && take_down) {
|
||||
NMDeviceStateReason ignored = NM_DEVICE_STATE_REASON_NONE;
|
||||
|
|
@ -3347,6 +3340,13 @@ dispose (GObject *object)
|
|||
nm_device_set_ip4_config (self, NULL, FALSE, &ignored);
|
||||
}
|
||||
|
||||
/* reset the saved RA value */
|
||||
if (priv->ip6_accept_ra_path) {
|
||||
nm_utils_do_sysctl (priv->ip6_accept_ra_path,
|
||||
priv->ip6_accept_ra_save ? "1\n" : "0\n");
|
||||
}
|
||||
g_free (priv->ip6_accept_ra_path);
|
||||
|
||||
activation_source_clear (self, TRUE, AF_INET);
|
||||
activation_source_clear (self, TRUE, AF_INET6);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue