From cec9e173d73b36746ed343339d5c725bc74d3da6 Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Tue, 25 Feb 2020 23:55:11 +0000 Subject: [PATCH] [mod_rtmp] scan-build: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'profile') - config_profile() --- src/mod/endpoints/mod_rtmp/mod_rtmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_rtmp/mod_rtmp.c b/src/mod/endpoints/mod_rtmp/mod_rtmp.c index 5a01436d22..585d91b552 100644 --- a/src/mod/endpoints/mod_rtmp/mod_rtmp.c +++ b/src/mod/endpoints/mod_rtmp/mod_rtmp.c @@ -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; }