From c66153680ecafa662c2ac6d45854546481e7e8c4 Mon Sep 17 00:00:00 2001 From: sauwming Date: Fri, 5 Jan 2024 15:09:19 +0800 Subject: [PATCH] Fixed TURN session use after free (#3814) Change-Id: Ie941658618e2a0e0da18a31dd0b449142c95bffa --- pjnath/src/pjnath/turn_session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pjnath/src/pjnath/turn_session.c b/pjnath/src/pjnath/turn_session.c index 35c2acf0d..2453f60f2 100644 --- a/pjnath/src/pjnath/turn_session.c +++ b/pjnath/src/pjnath/turn_session.c @@ -1210,7 +1210,7 @@ PJ_DEF(pj_status_t) pj_turn_session_connection_bind( PJ_STUN_ATTR_CONNECTION_ID, conn_id); - conn_bind = PJ_POOL_ZALLOC_T(pool, struct conn_bind_t); + conn_bind = PJ_POOL_ZALLOC_T(tdata->pool, struct conn_bind_t); conn_bind->id = conn_id; pj_sockaddr_cp(&conn_bind->peer_addr, peer_addr); conn_bind->peer_addr_len = addr_len;