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.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user