From: Dmitry Volyntsev Date: Tue, 14 Dec 2021 20:14:23 +0000 (+0000) Subject: Modules: removed dead code left after dfcbfb5e27b2. X-Git-Tag: 0.7.1~23 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=bb796f7b3f3b65a78248f3ba86d0929eb292ca8e;p=njs.git Modules: removed dead code left after dfcbfb5e27b2. Found by Coverity (CID 1495259). --- diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index 5b20a084..68592ad2 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -3469,7 +3469,6 @@ ngx_http_js_init_main_conf(ngx_conf_t *cf, void *conf) size_t size; u_char *start, *end, *p; - ngx_fd_t fd; ngx_str_t *m, file; njs_int_t rc; njs_str_t text, path; @@ -3488,7 +3487,6 @@ ngx_http_js_init_main_conf(ngx_conf_t *cf, void *conf) } size = 0; - fd = NGX_INVALID_FILE; import = jmcf->imports->elts; for (i = 0; i < jmcf->imports->nelts; i++) { @@ -3498,10 +3496,6 @@ ngx_http_js_init_main_conf(ngx_conf_t *cf, void *conf) start = ngx_pnalloc(cf->pool, size); if (start == NULL) { - if (fd != NGX_INVALID_FILE) { - (void) ngx_close_file(fd); - } - return NGX_CONF_ERROR; } diff --git a/nginx/ngx_stream_js_module.c b/nginx/ngx_stream_js_module.c index 55e2a6bd..44a7d38e 100644 --- a/nginx/ngx_stream_js_module.c +++ b/nginx/ngx_stream_js_module.c @@ -1491,7 +1491,6 @@ ngx_stream_js_init_main_conf(ngx_conf_t *cf, void *conf) size_t size; u_char *start, *end, *p; - ngx_fd_t fd; ngx_str_t *m, file; njs_int_t rc; njs_str_t text, path; @@ -1510,7 +1509,6 @@ ngx_stream_js_init_main_conf(ngx_conf_t *cf, void *conf) } size = 0; - fd = NGX_INVALID_FILE; import = jmcf->imports->elts; for (i = 0; i < jmcf->imports->nelts; i++) { @@ -1520,10 +1518,6 @@ ngx_stream_js_init_main_conf(ngx_conf_t *cf, void *conf) start = ngx_pnalloc(cf->pool, size); if (start == NULL) { - if (fd != NGX_INVALID_FILE) { - (void) ngx_close_file(fd); - } - return NGX_CONF_ERROR; }