diff --git a/main/config.c b/main/config.c
index 7626af9978792bd25ed93e7c06b6276fe9f87fd8..9889e639e0b9a496428d90fa803a0d05cf23e958 100644
--- a/main/config.c
+++ b/main/config.c
@@ -923,7 +923,7 @@ static struct ast_config *config_text_file_load(const char *database, const char
 				if (process_buf) {
 					char *buf = ast_strip(process_buf);
 					if (!ast_strlen_zero(buf)) {
-						if (process_text_line(cfg, &cat, buf, lineno, filename, withcomments)) {
+						if (process_text_line(cfg, &cat, buf, lineno, fn, withcomments)) {
 							cfg = NULL;
 							break;
 						}