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;