]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_rtmp] scan-build: Access to field 'name' results in a dereference of a null... 439/head
authorDragos Oancea <dragos@signalwire.com>
Tue, 25 Feb 2020 23:55:11 +0000 (23:55 +0000)
committerDragos Oancea <dragos@signalwire.com>
Tue, 25 Feb 2020 23:55:11 +0000 (23:55 +0000)
src/mod/endpoints/mod_rtmp/mod_rtmp.c

index 5a01436d22044c2a8135d888152c9bd61afcdc58..585d91b552a6f11dc7643d154535cf4017f81939 100644 (file)
@@ -1565,7 +1565,7 @@ static switch_status_t config_profile(rtmp_profile_t *profile, switch_bool_t rel
 
        for (x_profile = switch_xml_child(x_profiles, "profile"); x_profile; x_profile = x_profile->next) {
                const char *name = switch_xml_attr_soft(x_profile, "name");
-               if (strcmp(name, profile->name)) {
+               if (profile && strcmp(name, profile->name)) {
                        continue;
                }