Set SRTP context to NULL after deallocation (#3097)

This commit is contained in:
sauwming 2022-09-29 08:59:20 +08:00 committed by GitHub
parent dbbeb06ed5
commit 1c3f63e502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1087,6 +1087,8 @@ PJ_DEF(pj_status_t) pjmedia_transport_srtp_stop(pjmedia_transport *srtp)
"Failed to dealloc TX SRTP context: %s",
get_libsrtp_errstr(err)));
}
p_srtp->srtp_rx_ctx = NULL;
p_srtp->srtp_tx_ctx = NULL;
p_srtp->session_inited = PJ_FALSE;
pj_bzero(&p_srtp->rx_policy, sizeof(p_srtp->rx_policy));