mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
Merge pull request #429 from dragos-oancea/mod_erlang_event-nullptr-deref
[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:
commit
996daffb40
@ -1376,7 +1376,9 @@ static listener_t *new_outbound_listener_locked(char *node)
|
||||
listener->peer_nodename = switch_core_strdup(listener->pool, node);
|
||||
}
|
||||
|
||||
switch_thread_rwlock_rdlock(listener->rwlock);
|
||||
if (listener) {
|
||||
switch_thread_rwlock_rdlock(listener->rwlock);
|
||||
}
|
||||
|
||||
return listener;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user