diff options
author | Thomas Haller <thaller@redhat.com> | 2019-08-03 12:27:57 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-08-03 12:28:33 +0200 |
commit | a3f9ab473b17d2b41f36dfed56e7fb93aafb9e9b (patch) | |
tree | 40af8993129787269abaef2ae8e1556fedb13203 | |
parent | 8f2e3d14398ab7a6242b9b3f203599f7d960e5f5 (diff) | |
download | NetworkManager-a3f9ab473b17d2b41f36dfed56e7fb93aafb9e9b.tar.gz |
wireguard: fix use-after free in _peers_remove()
(cherry picked from commit 85c26341a280b1234cf73c6537b0bae55fb3adbf)
-rw-r--r-- | src/devices/nm-device-wireguard.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/nm-device-wireguard.c b/src/devices/nm-device-wireguard.c index d08f1afd47..e3b8e8b4c4 100644 --- a/src/devices/nm-device-wireguard.c +++ b/src/devices/nm-device-wireguard.c @@ -524,7 +524,7 @@ _peers_remove (NMDeviceWireGuardPrivate *priv, nm_clear_g_cancellable (&peer_data->ep_resolv.cancellable); g_slice_free (PeerData, peer_data); - if (c_list_is_empty (&peer_data->lst_peers)) { + if (c_list_is_empty (&priv->lst_peers_head)) { nm_clear_g_source (&priv->resolve_next_try_id); nm_clear_g_source (&priv->link_config_delayed_id); } |