Mercurial > hg > nginx
changeset 5784:f87afb46ccd2
Core: improved ngx_pstrdup() error handling.
author | Tatsuhiko Kubo <cubicdaiya@gmail.com> |
---|---|
date | Fri, 01 Aug 2014 20:04:14 +0900 |
parents | dc7c139fca21 |
children | fbdab7f38fd6 |
files | src/core/ngx_conf_file.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c @@ -781,6 +781,9 @@ ngx_conf_include(ngx_conf_t *cf, ngx_com file.len = name.len++; file.data = ngx_pstrdup(cf->pool, &name); + if (file.data == NULL) { + return NGX_CONF_ERROR; + } ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data);