From: Andrey Volk Date: Mon, 19 Apr 2021 22:33:29 +0000 (+0300) Subject: [Core] scan-build: Argument with 'nonnull' attribute passed null in switch_loadable_m... X-Git-Tag: v1.10.7^2~249 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92a55cf85a2130e57ca5ba4732973e8777182ffa;p=thirdparty%2Ffreeswitch.git [Core] scan-build: Argument with 'nonnull' attribute passed null in switch_loadable_module_load_module_ex() --- diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index 174644faff..268b76f1c4 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -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); }