]> granicus.if.org Git - libevent/commitdiff
Oops. event_config.flags was never initialized. Bugfix on 2.0.1-alpha. Found by...
authorNick Mathewson <nickm@torproject.org>
Thu, 23 Apr 2009 21:34:37 +0000 (21:34 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 23 Apr 2009 21:34:37 +0000 (21:34 +0000)
svn:r1236

ChangeLog
event.c

index 3b1e0d53f9628d62616e685f32fb8bf26f1da70a..de04e7b893d7082e2d6e4b2f8a3c2620f4a38101 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ Changes in 2.0.2-alpha:
  o Fix a bug when removing a timeout from the heap. [Patch from Marko Kreen]
  o Use signal.h, not sys/signal.h. [Patch from mmadia]
  o Try harder to build with certain older c99 compilers.
+ o Make sure that an event_config's flags field is always initialized to 0. [Bug report from Victor Goya]
 
 Changes in 2.0.1-alpha:
  o free minheap on event_base_free(); from Christopher Layne
diff --git a/event.c b/event.c
index 4792827f27aa0278671998247bab70a5c9060855..f15b3b24fbbdcf28265a237b83f028eb44d0a26a 100644 (file)
--- a/event.c
+++ b/event.c
@@ -479,13 +479,12 @@ event_get_supported_methods(void)
 struct event_config *
 event_config_new(void)
 {
-       struct event_config *cfg = mm_malloc(sizeof(*cfg));
+       struct event_config *cfg = mm_calloc(1, sizeof(*cfg));
 
        if (cfg == NULL)
                return (NULL);
 
        TAILQ_INIT(&cfg->entries);
-       cfg->require_features = 0;
 
        return (cfg);
 }