mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04:00
Fix a dumb bug where we would allocate too little memory in event_get_supported_methods().
svn:r1383
This commit is contained in:
parent
709c21c48c
commit
f8b527e6a1
@ -1,5 +1,6 @@
|
|||||||
Changes in 2.0.3-alpha:
|
Changes in 2.0.3-alpha:
|
||||||
o Add a new code to support SSL/TLS on bufferevents, using the OpenSSL library (where available).
|
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:
|
Changes in 2.0.2-alpha:
|
||||||
o Add a new flag to bufferevents to make all callbacks automatically deferred.
|
o Add a new flag to bufferevents to make all callbacks automatically deferred.
|
||||||
|
4
event.c
4
event.c
@ -463,15 +463,13 @@ event_reinit(struct event_base *base)
|
|||||||
const char **
|
const char **
|
||||||
event_get_supported_methods(void)
|
event_get_supported_methods(void)
|
||||||
{
|
{
|
||||||
static const char **methods;
|
static const char **methods = NULL;
|
||||||
const struct eventop **method;
|
const struct eventop **method;
|
||||||
const char **tmp;
|
const char **tmp;
|
||||||
int i = 0, k;
|
int i = 0, k;
|
||||||
|
|
||||||
/* count all methods */
|
/* count all methods */
|
||||||
for (method = &eventops[0]; *method != NULL; ++method) {
|
for (method = &eventops[0]; *method != NULL; ++method) {
|
||||||
if (event_is_method_disabled((*method)->name))
|
|
||||||
continue;
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user