aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-13 13:44:09 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-13 13:44:09 +0000
commit375688cd33afbd009a010d53cabc85fb20c4b5d2 (patch)
treea599de319e59f009fb06861d04ab49881495043c /contrib
parent70076b2ebb592b46fc7b9de912d60e1560fcc0f8 (diff)
downloadrspamd-375688cd33afbd009a010d53cabc85fb20c4b5d2.tar.gz
rspamd-375688cd33afbd009a010d53cabc85fb20c4b5d2.zip
[Minor] UCL: Save filename when setting file vars
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libucl/ucl_util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/libucl/ucl_util.c b/contrib/libucl/ucl_util.c
index 279e9f3c6..10e5df61f 100644
--- a/contrib/libucl/ucl_util.c
+++ b/contrib/libucl/ucl_util.c
@@ -1934,6 +1934,11 @@ ucl_parser_set_filevars (struct ucl_parser *parser, const char *filename, bool n
ucl_parser_register_variable (parser, "FILENAME", realbuf);
curdir = dirname (realbuf);
ucl_parser_register_variable (parser, "CURDIR", curdir);
+
+ if (parser->cur_file) {
+ free (parser->cur_file);
+ }
+ parser->cur_file = strdup (filename);
}
else {
/* Set everything from the current dir */