From c40309ae8e17d8cabb0b437fbfa3a24757a0cf46 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 22 Sep 2021 22:59:02 +0900 Subject: [PATCH] nghttpx: optarg should be allocated per configuration --- src/shrpx_config.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shrpx_config.cc b/src/shrpx_config.cc index 76704d0e..74483d19 100644 --- a/src/shrpx_config.cc +++ b/src/shrpx_config.cc @@ -3866,7 +3866,7 @@ int parse_config(Config *config, int optid, const StringRef &opt, "65535], inclusive"; return -1; } - config->http.redirect_https_port = optarg; + config->http.redirect_https_port = make_string_ref(config->balloc, optarg); return 0; } case SHRPX_OPTID_FRONTEND_MAX_REQUESTS: @@ -4007,7 +4007,7 @@ int parse_config(Config *config, int optid, const StringRef &opt, return 0; case SHRPX_OPTID_FRONTEND_QUIC_QLOG_DIR: #ifdef ENABLE_HTTP3 - config->quic.upstream.qlog.dir = optarg; + config->quic.upstream.qlog.dir = make_string_ref(config->balloc, optarg); #endif // ENABLE_HTTP3 return 0;