aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--format.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/format.c b/format.c
index 1b967c93..be53ad93 100644
--- a/format.c
+++ b/format.c
@@ -191,10 +191,15 @@ static void
format_job_update(struct job *job)
{
struct format_job *fj = job->data;
- char *line;
+ struct evbuffer *evb = job->event->input;
+ char *line = NULL, *next;
time_t t;
- if ((line = evbuffer_readline(job->event->input)) == NULL)
+ while ((next = evbuffer_readline(evb)) != NULL) {
+ free(line);
+ line = next;
+ }
+ if (line == NULL)
return;
fj->updated = 1;