diff options
Diffstat (limited to 'src/nxt_array.c')
-rw-r--r-- | src/nxt_array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_array.c b/src/nxt_array.c index 6fe9ad6a..1e13c22a 100644 --- a/src/nxt_array.c +++ b/src/nxt_array.c @@ -51,7 +51,7 @@ nxt_array_add(nxt_array_t *array) if (nalloc < 16) { /* Allocate new array twice larger than current. */ - new_alloc = nalloc * 2; + new_alloc = (nalloc == 0) ? 4 : nalloc * 2; } else { /* Allocate new array 1.5 times larger than current. */ |