summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-11-06 11:19:46 +1000
committerteor <teor@torproject.org>2019-11-06 11:19:46 +1000
commitde6ceb0bee8c1bf56d8929940a109bdc2a2d7521 (patch)
tree64cefa8b30b050e26229f307bca8a9d65a7310ae /src/lib
parent4f9a0033920b21882c4b6eead3c55551826ee8e9 (diff)
parent03e77ef036e41486b8bfe138d11790c928f49f35 (diff)
downloadtor-de6ceb0bee8c1bf56d8929940a109bdc2a2d7521.tar.gz
tor-de6ceb0bee8c1bf56d8929940a109bdc2a2d7521.zip
Merge branch 'maint-0.4.0' into maint-0.4.1
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/fs/conffile.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/fs/conffile.c b/src/lib/fs/conffile.c
index 7bb2f23931..0d5d56b335 100644
--- a/src/lib/fs/conffile.c
+++ b/src/lib/fs/conffile.c
@@ -153,16 +153,18 @@ config_process_include(const char *path, int recursion_level, int extended,
int rv = -1;
SMARTLIST_FOREACH_BEGIN(config_files, const char *, config_file) {
config_line_t *included_config = NULL;
+ config_line_t *included_config_last = NULL;
if (config_get_included_config(config_file, recursion_level, extended,
- &included_config, list_last,
+ &included_config, &included_config_last,
opened_lst) < 0) {
goto done;
}
*next = included_config;
- if (*list_last)
- next = &(*list_last)->next;
-
+ if (included_config_last) {
+ next = &included_config_last->next;
+ *list_last = included_config_last;
+ }
} SMARTLIST_FOREACH_END(config_file);
*list = ret_list;
rv = 0;