aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_conf_file.c
diff options
context:
space:
mode:
authorTatsuhiko Kubo <cubicdaiya@gmail.com>2014-08-01 20:04:14 +0900
committerTatsuhiko Kubo <cubicdaiya@gmail.com>2014-08-01 20:04:14 +0900
commit244a6a28b1dbfdc96d81f73568d5f24716660918 (patch)
tree7afe8a9664a01a76b6a72790d4f22c740627c758 /src/core/ngx_conf_file.c
parent88132eed5438f57b61660687c5037e2643a38bed (diff)
downloadnginx-244a6a28b1dbfdc96d81f73568d5f24716660918.tar.gz
nginx-244a6a28b1dbfdc96d81f73568d5f24716660918.zip
Core: improved ngx_pstrdup() error handling.
Diffstat (limited to 'src/core/ngx_conf_file.c')
-rw-r--r--src/core/ngx_conf_file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index d6b5cdf1e..ec3c1fae1 100644
--- 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_command_t *cmd, void *conf)
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);