[nginx] Leave chain in ngx_chain_add_copy() in consistent state on errors.
Sergey Kandaurov
pluknet at nginx.com
Mon Jun 4 16:00:43 UTC 2018
details: http://hg.nginx.org/nginx/rev/da9941c9b01b
branches:
changeset: 7282:da9941c9b01b
user: Sergey Kandaurov <pluknet at nginx.com>
date: Mon Jun 04 18:47:54 2018 +0300
description:
Leave chain in ngx_chain_add_copy() in consistent state on errors.
diffstat:
src/core/ngx_buf.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r bd6563e81cea -r da9941c9b01b src/core/ngx_buf.c
--- a/src/core/ngx_buf.c Wed May 30 15:40:34 2018 +0300
+++ b/src/core/ngx_buf.c Mon Jun 04 18:47:54 2018 +0300
@@ -137,6 +137,7 @@ ngx_chain_add_copy(ngx_pool_t *pool, ngx
while (in) {
cl = ngx_alloc_chain_link(pool);
if (cl == NULL) {
+ *ll = NULL;
return NGX_ERROR;
}
More information about the nginx-devel
mailing list