X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fdrtables.c;h=c83012944398c7aca717526dae5579fc5333d2df;hb=7e3ce68e68ab9b8906a637d352993abf361554e2;hp=d07123453db79931e029c7744a87a3dc572c09f5;hpb=80fea873648ca2ab2e592999a336c59cf054ab55;p=exim.git diff --git a/src/src/drtables.c b/src/src/drtables.c index d07123453..c83012944 100644 --- a/src/src/drtables.c +++ b/src/src/drtables.c @@ -524,8 +524,6 @@ init_lookup_list(void) int moduleerrors = 0; #endif struct lookupmodulestr *p; - const pcre *regex_islookupmod = regex_must_compile( - US"\\." DYNLIB_FN_EXT "$", FALSE, TRUE); if (lookup_list_init_done) return; @@ -610,6 +608,9 @@ init_lookup_list(void) log_write(0, LOG_MAIN, "Couldn't open %s: not loading lookup modules\n", LOOKUP_MODULE_DIR); } else { + const pcre *regex_islookupmod = regex_must_compile( + US"\\." DYNLIB_FN_EXT "$", FALSE, TRUE); + DEBUG(D_lookup) debug_printf("Loading lookup modules from %s\n", LOOKUP_MODULE_DIR); while ((ent = readdir(dd)) != NULL) { char *name = ent->d_name; @@ -666,14 +667,13 @@ init_lookup_list(void) countmodules++; } } + store_free((void*)regex_islookupmod); closedir(dd); } DEBUG(D_lookup) debug_printf("Loaded %d lookup modules\n", countmodules); #endif - store_free((void*)regex_islookupmod); - DEBUG(D_lookup) debug_printf("Total %d lookups\n", lookup_list_count); lookup_list = store_malloc(sizeof(lookup_info *) * lookup_list_count);