[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/main] hs: Fix memory leak if service failed to configure
commit e0a6a0d085e7918f1128d6300aa64361467a0c3f
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date: Thu Oct 14 10:09:25 2021 -0400
hs: Fix memory leak if service failed to configure
Closes #40484
Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
changes/ticket40484 | 5 +++++
src/feature/hs/hs_config.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/changes/ticket40484 b/changes/ticket40484
new file mode 100644
index 0000000000..9a9ffdf448
--- /dev/null
+++ 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
index f9f71c78f2..de1f608ddf 100644
--- 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;
}
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits