fix error-handling for ngx_alloc_chain_link