diff --git a/src/sipevent/listen.c b/src/sipevent/listen.c index c18a835..b2d4e78 100644 --- a/src/sipevent/listen.c +++ b/src/sipevent/listen.c @@ -217,6 +217,9 @@ static void notify_handler(struct sipevent_sock *sock, break; } + if (sub->terminated) + return; + mem_ref(sub); sub->notifyh(msg, sub->arg); nrefs = mem_nrefs(sub);