blob: fe1edc4a30c0962c30b09841531da62e8896445a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- ./bin/varnishd/waiter/cache_waiter_epoll.c.orig
+++ ./bin/varnishd/waiter/cache_waiter_epoll.c
@@ -68,7 +68,7 @@
static void *
vwe_thread(void *priv)
{
- struct epoll_event ev[NEEV], *ep;
+ struct epoll_event *ev, *ep;
struct waited *wp;
struct waiter *w;
double now, then;
@@ -80,6 +80,9 @@
w = vwe->waiter;
CHECK_OBJ_NOTNULL(w, WAITER_MAGIC);
THR_SetName("cache-epoll");
+ ev = calloc(NEEV, sizeof(struct epoll_event));
+ assert(ev != NULL);
+
THR_Init();
now = VTIM_real();
@@ -148,6 +151,7 @@
closefd(&vwe->pipe[0]);
closefd(&vwe->pipe[1]);
closefd(&vwe->epfd);
+ free(ev);
return (NULL);
}
|