fix error-handling for ngx_pcalloc

We should handle a error for `ngx_pcalloc`.