1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 14:55:37 +03:00

core/unit: fix use-after-free

Fixes #23312.
This commit is contained in:
Yu Watanabe 2022-05-09 00:56:05 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 4e5f4733c5
commit 734582830b

View File

@ -684,8 +684,8 @@ Unit* unit_free(Unit *u) {
unit_dequeue_rewatch_pids(u); unit_dequeue_rewatch_pids(u);
sd_bus_slot_unref(u->match_bus_slot); u->match_bus_slot = sd_bus_slot_unref(u->match_bus_slot);
sd_bus_track_unref(u->bus_track); u->bus_track = sd_bus_track_unref(u->bus_track);
u->deserialized_refs = strv_free(u->deserialized_refs); u->deserialized_refs = strv_free(u->deserialized_refs);
u->pending_freezer_message = sd_bus_message_unref(u->pending_freezer_message); u->pending_freezer_message = sd_bus_message_unref(u->pending_freezer_message);