1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

core/unit: fix use-after-free

Fixes #23312.

(cherry picked from commit 734582830b)
This commit is contained in:
Yu Watanabe 2022-05-09 00:56:05 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 1a48a63a4e
commit 3daae87857

View File

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