calendarspec: minor simplification

This commit is contained in:
Lennart Poettering 2020-04-30 13:20:23 +02:00
parent 3c6f0300ae
commit 05851cb9df

View file

@ -369,14 +369,13 @@ int calendar_spec_to_string(const CalendarSpec *c, char **p) {
} }
r = fflush_and_check(f); r = fflush_and_check(f);
fclose(f);
if (r < 0) { if (r < 0) {
free(buf); free(buf);
fclose(f);
return r; return r;
} }
fclose(f);
*p = buf; *p = buf;
return 0; return 0;
} }