@miconda commented on this pull request.
@@ -169,12 +169,16 @@ int msrp_relay(msrp_frame_t *mf)
wsev.len = p - reqbuf;
wsev.id = con->id;
evp.data = (void *)&wsev;
+ tcpconn_put(con);
return sr_event_exec(SREV_TCP_WS_FRAME_OUT, &evp);
}
I think the code has to be changed to do the `tcpconn_put(con)` after
`sr_event_exec(SREV_TCP_WS_FRAME_OUT, &evp);`. Declare `int ret;` at the beginning of
the function and then:
```
ret = sr_event_exec(SREV_TCP_WS_FRAME_OUT, &evp);
tcpconn_put(con);
return ret;
```
I haven't read the code thoroughly, but I expect that if the connection is released
before event execution, then it is a risk that the connection is destroyed while executing
the event callbacks.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2890#pullrequestreview-785455894