]> granicus.if.org Git - libevent/commitdiff
Fix a dumb bug where we would allocate too little memory in event_get_supported_metho...
authorNick Mathewson <nickm@torproject.org>
Tue, 28 Jul 2009 05:09:06 +0000 (05:09 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 28 Jul 2009 05:09:06 +0000 (05:09 +0000)
svn:r1383

ChangeLog
event.c

index 85141a6d4d7cde63dabc28e22d7e225250111fbf..1ccc2143fd7267912b3b11faac9228476e8fa2d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 Changes in 2.0.3-alpha:
  o Add a new code to support SSL/TLS on bufferevents, using the OpenSSL library (where available).
+ o Fix a bug where we didn't allocate enough memory in event_get_supported_methods().
 
 Changes in 2.0.2-alpha:
  o Add a new flag to bufferevents to make all callbacks automatically deferred.
diff --git a/event.c b/event.c
index 83526d090372fd4e036fae7c1e5c5a8d7f0d2fbc..5713f62e2fd85aca724fe871b4468c7f85cf1a3a 100644 (file)
--- a/event.c
+++ b/event.c
@@ -463,15 +463,13 @@ event_reinit(struct event_base *base)
 const char **
 event_get_supported_methods(void)
 {
-       static const char **methods;
+       static const char **methods = NULL;
        const struct eventop **method;
        const char **tmp;
        int i = 0, k;
 
        /* count all methods */
        for (method = &eventops[0]; *method != NULL; ++method) {
-               if (event_is_method_disabled((*method)->name))
-                       continue;
                ++i;
        }