Module: kamailio Branch: master Commit: abc0ce47896f3cd3d5d1ca4def0a79978256d733 URL: https://github.com/kamailio/kamailio/commit/abc0ce47896f3cd3d5d1ca4def0a7997...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2025-04-10T19:17:04+02:00
core: print path in debug before releasing when load module option skips duplicates
---
Modified: src/core/sr_module.c
---
Diff: https://github.com/kamailio/kamailio/commit/abc0ce47896f3cd3d5d1ca4def0a7997... Patch: https://github.com/kamailio/kamailio/commit/abc0ce47896f3cd3d5d1ca4def0a7997...
---
diff --git a/src/core/sr_module.c b/src/core/sr_module.c index a2e28acf030..d6d1d117188 100644 --- a/src/core/sr_module.c +++ b/src/core/sr_module.c @@ -617,10 +617,12 @@ int ksr_load_module(char *mod_path, char *opts) for(t = modules; t; t = t->next) { if(t->handle == handle) { if(ldopt == 1) { - if(path && path != mod_path) { - pkg_free(path); + if(path) { + LM_DBG("skip loading optional module twice (%s)\n", path); + if(path != mod_path) { + pkg_free(path); + } } - LM_DBG("skip loading optional module twice (%s)\n", path); return 0; } LM_WARN("attempting to load the same module twice (%s)\n", path);