]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs: Fix memory leak if service failed to configure
authorDavid Goulet <dgoulet@torproject.org>
Thu, 14 Oct 2021 14:09:25 +0000 (10:09 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Thu, 14 Oct 2021 14:15:16 +0000 (10:15 -0400)
Closes #40484

Signed-off-by: David Goulet <dgoulet@torproject.org>
changes/ticket40484 [new file with mode: 0644]
src/feature/hs/hs_config.c

diff --git a/changes/ticket40484 b/changes/ticket40484
new file mode 100644 (file)
index 0000000..9a9ffdf
--- /dev/null
@@ -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.
+
index f9f71c78f2c5843ff9a8b14c01e2a91617d94a3c..de1f608ddf0106666ebd324a7aa622dca50d55c4 100644 (file)
@@ -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;
     }
   }