[nginx] Core: improved ngx_pstrdup() error handling.
Maxim Dounin
mdounin at mdounin.ru
Fri Aug 1 21:50:15 UTC 2014
details: http://hg.nginx.org/nginx/rev/f87afb46ccd2
branches:
changeset: 5784:f87afb46ccd2
user: Tatsuhiko Kubo <cubicdaiya at gmail.com>
date: Fri Aug 01 20:04:14 2014 +0900
description:
Core: improved ngx_pstrdup() error handling.
diffstat:
src/core/ngx_conf_file.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
--- 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);
More information about the nginx-devel
mailing list