Events: fixed copying of old events in poll init.

Previously, the code incorrectly assumed "ngx_event_t *" elements
instead of "struct pollfd".

This is mostly cosmetic change, as this code is never called now.
This commit is contained in:
Maxim Dounin 2019-01-24 21:50:37 +03:00
parent 7618eefb58
commit 299f677cd7

View file

@ -84,7 +84,7 @@ ngx_poll_init(ngx_cycle_t *cycle, ngx_msec_t timer)
} }
if (event_list) { if (event_list) {
ngx_memcpy(list, event_list, sizeof(ngx_event_t *) * nevents); ngx_memcpy(list, event_list, sizeof(struct pollfd) * nevents);
ngx_free(event_list); ngx_free(event_list);
} }