chiark / gitweb /
timedated: fix a few memory leaks
[elogind.git] / src / core / unit.c
index 91a00edf7196ab58dfcee3f03099102d31dcc895..dbb188296546489a221cc59ac1ea031d9686278c 100644 (file)
@@ -701,7 +701,7 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
                 fprintf(f, "%s\tDropIn Path: %s\n", prefix, *j);
 
         if (u->job_timeout > 0)
-                fprintf(f, "%s\tJob Timeout: %s\n", prefix, format_timespan(timespan, sizeof(timespan), u->job_timeout));
+                fprintf(f, "%s\tJob Timeout: %s\n", prefix, format_timespan(timespan, sizeof(timespan), u->job_timeout, 0));
 
         condition_dump_list(u->conditions, f, prefix);
 
@@ -2910,7 +2910,7 @@ int unit_write_drop_in(Unit *u, bool runtime, const char *name, const char *data
                 return r;
 
         mkdir_p(p, 0755);
-        return write_one_line_file_atomic_label(q, data);
+        return write_string_file_atomic_label(q, data);
 }
 
 int unit_remove_drop_in(Unit *u, bool runtime, const char *name) {