Parcourir la source

core: print path in debug before releasing when load module option skips duplicates

Daniel-Constantin Mierla il y a 5 mois
Parent
commit
abc0ce4789
1 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 5 3
      src/core/sr_module.c

+ 5 - 3
src/core/sr_module.c

@@ -617,10 +617,12 @@ reload:
 	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);