aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2023-04-19 23:01:49 -0700
committerGarrett D'Amore <garrett@damore.org>2023-04-19 23:27:44 -0700
commit547502d817127d7aa4b71500171403a93435a3e9 (patch)
tree8c82233c6756de5878b71e501ea7edd79bcb06d0 /src
parent085d9a5b3f53ed43f1d523a8f2c9abb403e483e1 (diff)
downloadnng-547502d817127d7aa4b71500171403a93435a3e9.tar.gz
nng-547502d817127d7aa4b71500171403a93435a3e9.tar.bz2
nng-547502d817127d7aa4b71500171403a93435a3e9.zip
fixes#1611 http_sconn_error() in http_server.c; use after free
Diffstat (limited to 'src')
-rw-r--r--src/supplemental/http/http_server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/supplemental/http/http_server.c b/src/supplemental/http/http_server.c
index 5f0bb051..9a8fd285 100644
--- a/src/supplemental/http/http_server.c
+++ b/src/supplemental/http/http_server.c
@@ -1,5 +1,5 @@
//
-// Copyright 2022 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
// Copyright 2018 QXSoftware <lh563566994@126.com>
// Copyright 2019 Devolutions <info@devolutions.net>
@@ -486,6 +486,7 @@ http_sconn_error(http_sconn *sc, uint16_t err)
if (nni_http_res_set_header(res, "Connection", "close") != 0) {
nni_http_res_free(res);
http_sconn_close(sc);
+ return;
}
}
sc->res = res;