mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 02:46:58 +00:00
Fix null pointer dereference removing listeners
This commit is contained in:
parent
e12ff23e7d
commit
a6b2eeb190
@ -139,7 +139,7 @@ struct Listener * get_listener(int type, const void* typedata,
|
||||
struct Listener* listener;
|
||||
|
||||
for (i = 0, listener = ses.listeners[i]; i < ses.listensize; i++) {
|
||||
if (listener->type == type
|
||||
if (listener && listener->type == type
|
||||
&& match(typedata, listener->typedata)) {
|
||||
return listener;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user