commit | 244a6a28b1dbfdc96d81f73568d5f24716660918 | [log] [tgz] |
---|---|---|
author | Tatsuhiko Kubo <cubicdaiya@gmail.com> | Fri Aug 01 20:04:14 2014 +0900 |
committer | Tatsuhiko Kubo <cubicdaiya@gmail.com> | Fri Aug 01 20:04:14 2014 +0900 |
tree | 7afe8a9664a01a76b6a72790d4f22c740627c758 | |
parent | 88132eed5438f57b61660687c5037e2643a38bed [diff] |
Core: improved ngx_pstrdup() error handling.
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c index d6b5cdf..ec3c1fa 100644 --- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c
@@ -781,6 +781,9 @@ 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);