calendarspec: minor simplification

This commit is contained in:
Lennart Poettering 2020-04-30 13:20:23 +02:00
parent 3c6f0300ae
commit 05851cb9df
1 changed files with 2 additions and 3 deletions

View File

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