diff options
author | Thomas Haller <thaller@redhat.com> | 2021-09-16 09:15:04 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-09-16 09:30:58 +0200 |
commit | e1667650f428fb8e5c5ff2d1a8eb93ff1d28e1ac (patch) | |
tree | 5f07c21df79adccb21c0548b35a54550192a3278 | |
parent | 3e80b4fa63c6dae1dfc23d763d7a2340c2bfb340 (diff) | |
download | NetworkManager-e1667650f428fb8e5c5ff2d1a8eb93ff1d28e1ac.tar.gz |
l3cfg: fix leak of ObjStateData's os_plobj
Fixes: 6b92c8948656 ('l3cfg: track platform object in NML3Cfg's object state')
-rw-r--r-- | src/core/nm-l3cfg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/nm-l3cfg.c b/src/core/nm-l3cfg.c index ce3b56f312..45646e98fa 100644 --- a/src/core/nm-l3cfg.c +++ b/src/core/nm-l3cfg.c @@ -670,6 +670,7 @@ _obj_state_data_free(gpointer data) c_list_unlink_stale(&obj_state->os_lst); c_list_unlink_stale(&obj_state->os_temporary_not_available_lst); nmp_object_unref(obj_state->obj); + nmp_object_unref(obj_state->os_plobj); nm_g_slice_free(obj_state); } @@ -786,7 +787,7 @@ _obj_states_externally_removed_track(NML3Cfg *self, const NMPObject *obj, gboole nm_assert(c_list_is_empty(&obj_state->os_zombie_lst)); if (in_platform) { - obj_state->os_plobj = nmp_object_ref(obj); + nmp_object_ref_set(&obj_state->os_plobj, obj); obj_state->os_was_in_platform = TRUE; _LOGD("obj-state: appeared in platform: %s", _obj_state_data_to_string(obj_state, sbuf, sizeof(sbuf))); |