From e23df3af5a57d28ba40b14db1ad6d62f0ee99940 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sun, 29 Jan 2012 12:53:33 +0000 Subject: Sync OpenBSD patchset 1014: 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. --- job.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'job.c') diff --git a/job.c b/job.c index 03ee386b..1ec87d99 100644 --- a/job.c +++ b/job.c @@ -123,10 +123,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); } -- cgit