Call bufferevent_free before closing file descriptor associated with it

or bugs in $EventMechanism on $OtherOS makes libevent get it's knickers
in a twist. From Dylan Alex Simon.
This commit is contained in:
Nicholas Marriott
2012-01-29 02:22:11 +00:00
parent a7a44bfcd9
commit 9bbc63ed65
4 changed files with 12 additions and 12 deletions

4
job.c
View File

@ -124,10 +124,10 @@ job_free(struct job *job)
if (job->pid != -1)
kill(job->pid, SIGTERM);
if (job->fd != -1)
close(job->fd);
if (job->event != NULL)
bufferevent_free(job->event);
if (job->fd != -1)
close(job->fd);
xfree(job);
}