]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_sofia] scan-build: Argument with 'nonnull' attribute passed null
authorAndrey Volk <andywolk@gmail.com>
Thu, 1 Apr 2021 10:20:02 +0000 (13:20 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 19 Oct 2021 17:26:53 +0000 (20:26 +0300)
src/mod/endpoints/mod_sofia/sofia.c

index b5051dda767c4d909456195b9c86187bc8b067d4..c66f315816c0fede528dc9cfee64ed5145c1fb08 100644 (file)
@@ -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;