Klaus Demo nginx / 33e934c
Events: fixed null pointer dereference with resolver and poll. A POLLERR signalled by poll() without POLLIN/POLLOUT, as seen on Linux, would generate both read and write events, but there's no write event handler for resolver events. A fix is to only call event handler of an active event. Ruslan Ermilov 9 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
370370
371371 found = 0;
372372
373 if (revents & POLLIN) {
373 if ((revents & POLLIN) && c->read->active) {
374374 found = 1;
375375
376376 ev = c->read;
387387 ngx_locked_post_event(ev, queue);
388388 }
389389
390 if (revents & POLLOUT) {
390 if ((revents & POLLOUT) && c->write->active) {
391391 found = 1;
392392 ev = c->write;
393393