mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-30 19:39:34 -05:00
Fix for libevent 1.2 versions.
git-svn-id: file:///svn/unbound/trunk@916 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
da8ae735ce
commit
6ffe218762
1 changed files with 5 additions and 3 deletions
|
|
@ -129,10 +129,12 @@ comm_base_delete(struct comm_base* b)
|
|||
{
|
||||
if(!b)
|
||||
return;
|
||||
#ifdef HAVE_EVENT_BASE_FREE
|
||||
/* only libevent 1.2+ has it */
|
||||
#if defined(HAVE_EVENT_BASE_FREE) && defined(HAVE_EVENT_BASE_ONCE)
|
||||
/* only libevent 1.2+ has it, but in 1.2 it is broken -
|
||||
assertion fails on signal handling ev that is not deleted
|
||||
in libevent 1.3c (event_base_once appears) this is fixed. */
|
||||
event_base_free(b->eb->base);
|
||||
#endif /* HAVE_EVENT_BASE_FREE */
|
||||
#endif /* HAVE_EVENT_BASE_FREE and HAVE_EVENT_BASE_ONCE */
|
||||
b->eb->base = NULL;
|
||||
free(b->eb);
|
||||
free(b);
|
||||
|
|
|
|||
Loading…
Reference in a new issue