hs: Fix memory leak if service failed to configure

Closes #40484

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet 2021-10-14 10:09:25 -04:00
parent 4dfc5de509
commit e0a6a0d085
2 changed files with 6 additions and 0 deletions

5
changes/ticket40484 Normal file
View File

@ -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.

View 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;
}
}