]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] scan-build: Argument with 'nonnull' attribute passed null in switch_loadable_m...
authorAndrey Volk <andywolk@gmail.com>
Mon, 19 Apr 2021 22:33:29 +0000 (01:33 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 19 Oct 2021 17:26:52 +0000 (20:26 +0300)
src/switch_loadable_module.c

index 174644faffde1f03ebada43cba756b65fd9fb2b1..268b76f1c4475ab40e8373410b0954f62ed11e8f 100644 (file)
@@ -1843,11 +1843,11 @@ static switch_status_t switch_loadable_module_load_module_ex(const char *dir, co
                if ((dot = strchr(file, '.'))) {
                        *dot = '\0';
                }
-               len = strlen(dir);
+               len = strlen(switch_str_nil(dir));
                len += strlen(file);
                len += 8;
                path = (char *) switch_core_alloc(loadable_modules.pool, len);
-               switch_snprintf(path, len, "%s%s%s%s", dir, SWITCH_PATH_SEPARATOR, file, ext);
+               switch_snprintf(path, len, "%s%s%s%s", switch_str_nil(dir), SWITCH_PATH_SEPARATOR, file, ext);
        }