Previously, the realip module could be left with uninitialized context after an
error in the ngx_http_realip_set_addr() function. That context could be later
accessed by $realip_remote_addr and $realip_remote_port variable handlers.
}
ctx = cln->data;
- ngx_http_set_ctx(r, ctx, ngx_http_realip_module);
c = r->connection;
ngx_memcpy(p, text, len);
cln->handler = ngx_http_realip_cleanup;
+ ngx_http_set_ctx(r, ctx, ngx_http_realip_module);
ctx->connection = c;
ctx->sockaddr = c->sockaddr;