[core] scan-build: Null pointer passed as an argument to a 'nonnull' parameter - switch_event_base_add_header()

This commit is contained in:
Dragos Oancea 2020-01-30 21:56:44 +00:00
parent b067a7ccbd
commit b1dbb99f5c
1 changed files with 5 additions and 1 deletions

View File

@ -1114,7 +1114,11 @@ static switch_status_t switch_event_base_add_header(switch_event_t *event, switc
redraw:
len = 0;
for(j = 0; j < header->idx; j++) {
len += strlen(header->array[j]) + 2;
len += 2;
if (!header->array[j]) {
continue;
}
len += strlen(header->array[j]);
}
if (len) {