chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
units: for all unit settings that take lists, allow the empty string for resetting...
[elogind.git]
/
src
/
core
/
timer.c
diff --git
a/src/core/timer.c
b/src/core/timer.c
index 4453aa0781f5ef64bf14e9609959c7a091688d7a..8061f79e3aefddd31937eb49ce8ca7f874d7947c 100644
(file)
--- a/
src/core/timer.c
+++ b/
src/core/timer.c
@@
-48,8
+48,7
@@
static void timer_init(Unit *u) {
watch_init(&t->realtime_watch);
}
watch_init(&t->realtime_watch);
}
-static void timer_done(Unit *u) {
- Timer *t = TIMER(u);
+void timer_free_values(Timer *t) {
TimerValue *v;
assert(t);
TimerValue *v;
assert(t);
@@
-62,6
+61,14
@@
static void timer_done(Unit *u) {
free(v);
}
free(v);
}
+}
+
+static void timer_done(Unit *u) {
+ Timer *t = TIMER(u);
+
+ assert(t);
+
+ timer_free_values(t);
unit_unwatch_timer(u, &t->monotonic_watch);
unit_unwatch_timer(u, &t->realtime_watch);
unit_unwatch_timer(u, &t->monotonic_watch);
unit_unwatch_timer(u, &t->realtime_watch);