summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-11 11:51:06 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-11 11:51:06 -0400
commit6247f5a5ba6d300cd64a2639296c3514dcb70066 (patch)
treeb582e7659ca3816de9fe9883206bca4f193c430b /src
parent133e1e870bd59e3a89d5a7712983d3f9bf35f7c3 (diff)
parent72832086e2144158308b30133aa15b39f0d2eb5d (diff)
downloadtor-6247f5a5ba6d300cd64a2639296c3514dcb70066.tar.gz
tor-6247f5a5ba6d300cd64a2639296c3514dcb70066.zip
Merge branch 'maint-0.3.1'
Diffstat (limited to 'src')
-rw-r--r--src/common/confline.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/common/confline.c b/src/common/confline.c
index 691cbf8c6f..15fd96bf38 100644
--- a/src/common/confline.c
+++ b/src/common/confline.c
@@ -294,24 +294,26 @@ config_process_include(const char *path, int recursion_level, int extended,
return -1;
}
- SMARTLIST_FOREACH_BEGIN(config_files, char *, config_file) {
+ int rv = -1;
+ SMARTLIST_FOREACH_BEGIN(config_files, const char *, config_file) {
config_line_t *included_list = NULL;
if (config_get_included_list(config_file, recursion_level, extended,
&included_list, list_last) < 0) {
- SMARTLIST_FOREACH(config_files, char *, f, tor_free(f));
- smartlist_free(config_files);
- return -1;
+ goto done;
}
- tor_free(config_file);
*next = included_list;
if (*list_last)
next = &(*list_last)->next;
} SMARTLIST_FOREACH_END(config_file);
- smartlist_free(config_files);
*list = ret_list;
- return 0;
+ rv = 0;
+
+ done:
+ SMARTLIST_FOREACH(config_files, char *, f, tor_free(f));
+ smartlist_free(config_files);
+ return rv;
}
/**