conf-parser: fix memleak in config_parse_calendar()

Fixes a bug introduced by 0e10c3d872 (#25049).
This commit is contained in:
Yu Watanabe
2024-09-02 05:41:55 +09:00
parent 9afb4aea00
commit 8b4ef777fd
+4 -3
View File
@@ -2038,11 +2038,12 @@ int config_parse_calendar(
}
r = calendar_spec_from_string(rvalue, &c);
if (r < 0)
if (r < 0) {
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse calendar specification, ignoring: %s", rvalue);
else
*cr = TAKE_PTR(c);
return 0;
}
free_and_replace_full(*cr, c, calendar_spec_free);
return 0;
}