commit e0a6a0d085e7918f1128d6300aa64361467a0c3f
parent 4dfc5de509302e009f4137035cacbb687537c1fe
Author: David Goulet <dgoulet@torproject.org>
Date: Thu, 14 Oct 2021 10:09:25 -0400
hs: Fix memory leak if service failed to configure
Closes #40484
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/changes/ticket40484 b/changes/ticket40484
@@ -0,0 +1,5 @@
+ o Minor bugfixes (onion service, config):
+ - Fix a memory leak for a small config line string that could occur if the
+ service failed to be configured from file properly. Fixes bug 40484;
+ bugfix on 0.3.2.1-alpha.
+
diff --git a/src/feature/hs/hs_config.c b/src/feature/hs/hs_config.c
@@ -640,6 +640,7 @@ hs_config_service_all(const or_options_t *options, int validate_only)
int rv = config_service(section, options, new_service_list);
config_free_lines(section);
if (rv < 0) {
+ config_free_lines(remaining);
goto err;
}
}