diff --git a/src/sipevent/listen.c b/src/sipevent/listen.c index 1c498a5..0efae54 100644 --- a/src/sipevent/listen.c +++ b/src/sipevent/listen.c @@ -187,7 +187,11 @@ static void notify_handler(struct sipevent_sock *sock, if (sub->refer_cseq >= 0 && !sub->id && pl_isset(&event.id)) { - (void)pl_strdup(&sub->id, &event.id); + err = pl_strdup(&sub->id, &event.id); + if (err) { + (void)sip_treply(NULL, sip, msg, 500, strerror(err)); + return; + } } re_printf("notify: %s (%r)\n", sipevent_substate_name(state.state),