[mod_sofia] coverity CID 1024253 (Dereference before null check)

This commit is contained in:
Dragos Oancea 2023-05-31 16:10:36 +03:00 committed by Andrey Volk
parent b878a60482
commit 0643da7c5b

View File

@ -4313,6 +4313,8 @@ SWITCH_STANDARD_API(sofia_presence_data_function)
user = argv[1];
}
if (!user) goto end;
if ((domain = strchr(user, '@'))) {
*domain++ = '\0';
if ((concat = strchr(domain, '/'))) {
@ -4329,8 +4331,6 @@ SWITCH_STANDARD_API(sofia_presence_data_function)
domain = dup_domain;
}
if (!user) goto end;
if (zstr(profile_name) || strcmp(profile_name, "*") || zstr(domain)) {
if (!zstr(profile_name)) {
profile = sofia_glue_find_profile(profile_name);