Previously, in "ranges" mode when all added ranges were deleted,
the ctx.high.low[i] was left pointing to a temporary array.
for (i = 0; i < 0x10000; i++) {
a = (ngx_array_t *) ctx.high.low[i];
- if (a == NULL || a->nelts == 0) {
+ if (a == NULL) {
+ continue;
+ }
+
+ if (a->nelts == 0) {
+ ctx.high.low[i] = NULL;
continue;
}
for (i = 0; i < 0x10000; i++) {
a = (ngx_array_t *) ctx.high.low[i];
- if (a == NULL || a->nelts == 0) {
+ if (a == NULL) {
+ continue;
+ }
+
+ if (a->nelts == 0) {
+ ctx.high.low[i] = NULL;
continue;
}