summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-10-24 18:33:29 +0200
committerLennart Poettering <lennart@poettering.net>2014-10-24 18:33:29 +0200
commit0b76b4d8c28e8d82422ddeea2cc3c079fe4bb3dc (patch)
tree3e29b066fbdfb532ab25db02e72a0511452409ba /src/core
parent69f0081748fb4be1b7b772815e5c4202cdb88d3d (diff)
calendar: make freeing a calendar spec object deal fine with NULL
In order to make object destruction easier (in particular in combination with _cleanup_) we usually make destructors deal with NULL objects as NOPs. Change the calendar spec destructor to follow the same scheme.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/load-fragment.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 6b6f9908b5..e193a67dcd 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -1366,8 +1366,7 @@ int config_parse_timer(const char *unit,
v = new0(TimerValue, 1);
if (!v) {
- if (c)
- calendar_spec_free(c);
+ calendar_spec_free(c);
return log_oom();
}