fix mgcp_conn_free_all
It calls itself recursively which messes with the list an ep, so ubsan complains. Change-Id: If38ead0ba0c28396df2332990c98b2532cf17d1c
This commit is contained in:
parent
25ecc91c3b
commit
fdbefde869
|
@ -328,12 +328,10 @@ void mgcp_conn_free_oldest(struct mgcp_endpoint *endp)
|
||||||
void mgcp_conn_free_all(struct mgcp_endpoint *endp)
|
void mgcp_conn_free_all(struct mgcp_endpoint *endp)
|
||||||
{
|
{
|
||||||
struct mgcp_conn *conn;
|
struct mgcp_conn *conn;
|
||||||
struct mgcp_conn *conn_tmp;
|
|
||||||
|
|
||||||
/* Drop all items in the list */
|
/* Drop all items in the list, might be consecutive! */
|
||||||
llist_for_each_entry_safe(conn, conn_tmp, &endp->conns, entry) {
|
while ((conn = llist_first_entry_or_null(&endp->conns, struct mgcp_conn, entry)))
|
||||||
mgcp_conn_free(endp, conn->id);
|
mgcp_conn_free(endp, conn->id);
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue