summaryrefslogtreecommitdiffstats
path: root/src/core/timer.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-05-10 07:10:17 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-10 13:50:50 +0200
commit756491af392a99c4286d876b0041535e50df80ad (patch)
tree681c62d6a2bff681ac33e08e73a628b0b378bedb /src/core/timer.c
parentcore/timer: fix memleak (diff)
downloadsystemd-756491af392a99c4286d876b0041535e50df80ad.tar.xz
systemd-756491af392a99c4286d876b0041535e50df80ad.zip
core/timer: fix potential use-after-free
Diffstat (limited to 'src/core/timer.c')
-rw-r--r--src/core/timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/timer.c b/src/core/timer.c
index 17663a175b..63256d541a 100644
--- a/src/core/timer.c
+++ b/src/core/timer.c
@@ -68,7 +68,7 @@ static void timer_done(Unit *u) {
t->monotonic_event_source = sd_event_source_disable_unref(t->monotonic_event_source);
t->realtime_event_source = sd_event_source_disable_unref(t->realtime_event_source);
- free(t->stamp_path);
+ t->stamp_path = mfree(t->stamp_path);
}
static int timer_verify(Timer *t) {