]> git.llucax.com Git - software/eventxx.git/commitdiff
Prevents a bug in libevent event_base_free().
authorLeandro Lucarella <llucarella@integratech.com.ar>
Wed, 27 Dec 2006 19:03:46 +0000 (19:03 +0000)
committerLeandro Lucarella <llucarella@integratech.com.ar>
Wed, 27 Dec 2006 19:03:46 +0000 (19:03 +0000)
event_base_free() has a bug that make it assert() always. This patch avoid using
it (leaking memory).

event

diff --git a/event b/event
index a4577bd77f3cfd273bb6f09947eea86c2835d71e..d2ec386484d3ab130891390c1f84b63404814129 100644 (file)
--- a/event
+++ b/event
@@ -524,7 +524,9 @@ struct dispatcher
                internal::event_base_priority_init(_event_base, npriorities);
        }
 
+#ifdef EVENT_BASE_FREE_FIX
        ~dispatcher() throw() { event_base_free(_event_base); }
+#endif
 
        /**
         * Adds an event to the dispatcher.