[Core] Coverity: 1060958 Dereference before null check

This commit is contained in:
Andrey Volk
2023-10-01 14:01:32 +03:00
parent 4f48835575
commit e8f6102685
+1 -1
View File
@@ -2814,7 +2814,7 @@ SWITCH_DECLARE(int) switch_ivr_set_xml_call_stats(switch_xml_t xml, switch_core_
static int switch_ivr_set_xml_chan_var(switch_xml_t xml, const char *var, const char *val, int off)
{
char *data;
switch_size_t dlen = strlen(val) * 3 + 1;
switch_size_t dlen = val ? strlen(val) * 3 + 1 : 1;
switch_xml_t variable;
if (!val) val = "";