mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-11 05:14:46 -04:00
from trunk: Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec
svn:r1437
This commit is contained in:
parent
03a9da175a
commit
c5a0f56c9a
@ -2,6 +2,7 @@ Changes in 1.4.13-stable:
|
|||||||
o If the kernel tells us that there are a negative number of bytes to read from a socket, do not believe it. Fixes bug 2841177; found by Alexander Pronchenkov.
|
o If the kernel tells us that there are a negative number of bytes to read from a socket, do not believe it. Fixes bug 2841177; found by Alexander Pronchenkov.
|
||||||
o Do not allocate the maximum event queue and fd array for the epoll backend at startup. Instead, start out accepting 32 events at a time, and double the queue's size when it seems that the OS is generating events faster than we're requesting them. Saves up to 512K per epoll-based event_base. Resolves bug 2839240.
|
o Do not allocate the maximum event queue and fd array for the epoll backend at startup. Instead, start out accepting 32 events at a time, and double the queue's size when it seems that the OS is generating events faster than we're requesting them. Saves up to 512K per epoll-based event_base. Resolves bug 2839240.
|
||||||
o Fix compilation on Android, which forgot to define fd_mask in its sys/select.h
|
o Fix compilation on Android, which forgot to define fd_mask in its sys/select.h
|
||||||
|
o Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec
|
||||||
|
|
||||||
|
|
||||||
Changes in 1.4.12-stable:
|
Changes in 1.4.12-stable:
|
||||||
|
1
buffer.c
1
buffer.c
@ -225,7 +225,6 @@ evbuffer_readline(struct evbuffer *buffer)
|
|||||||
|
|
||||||
if ((line = malloc(i + 1)) == NULL) {
|
if ((line = malloc(i + 1)) == NULL) {
|
||||||
fprintf(stderr, "%s: out of memory\n", __func__);
|
fprintf(stderr, "%s: out of memory\n", __func__);
|
||||||
evbuffer_drain(buffer, i);
|
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user