[mod_erlang_event] scan-build: Access to field 'rwlock' results in a dereference of a null pointer (loaded from variable 'listener')

This commit is contained in:
Dragos Oancea 2020-02-25 21:30:10 +00:00
parent 42d3100609
commit 1ccd75c94b
1 changed files with 3 additions and 1 deletions

View File

@ -1376,7 +1376,9 @@ static listener_t *new_outbound_listener_locked(char *node)
listener->peer_nodename = switch_core_strdup(listener->pool, node);
}
if (listener) {
switch_thread_rwlock_rdlock(listener->rwlock);
}
return listener;
}