From: Andrey Volk Date: Thu, 1 Apr 2021 10:20:02 +0000 (+0300) Subject: [mod_sofia] scan-build: Argument with 'nonnull' attribute passed null X-Git-Tag: v1.10.7^2~246 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac1a3dc5653e55e5e77680a28e21989d979a3ad5;p=thirdparty%2Ffreeswitch.git [mod_sofia] scan-build: Argument with 'nonnull' attribute passed null --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index b5051dda76..c66f315816 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -4552,12 +4552,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name) "deprecated and will be removed - let FS devs know if you think it should stay\n"); } } else if (!strcasecmp(var, "rewrite-multicasted-fs-path")) { - if( (!strcasecmp(val, "to_host")) || (!strcasecmp(val, "1")) ) { + if(val && (!strcasecmp(val, "to_host") || !strcasecmp(val, "1")) ) { /* old behaviour */ mod_sofia_globals.rewrite_multicasted_fs_path = 1; - } else if (!strcasecmp(val, "original_server_host")) { + } else if (val && !strcasecmp(val, "original_server_host")) { mod_sofia_globals.rewrite_multicasted_fs_path = 2; - } else if (!strcasecmp(val, "original_hostname")) { + } else if (val && !strcasecmp(val, "original_hostname")) { mod_sofia_globals.rewrite_multicasted_fs_path = 3; } else { mod_sofia_globals.rewrite_multicasted_fs_path = SWITCH_FALSE;