}
static void lock_and_write_line(conf_t *conf, const char *line) {
- const char *now = encode_time(time(NULL));
+ char *now = encode_time(time(NULL));
FILE *f = fopen(FILENAME, "a");
take_lock(conf, f);
if (fclose(f) != 0)
die_err("Error closing output file");
+ free(now);
write_acknowledgment(conf);
}