Skip to content

Commit

Permalink
Call pjmedia_srtp_deinit_lib() when srtp_init() fail (#3719)
Browse files Browse the repository at this point in the history
  • Loading branch information
trengginas authored Oct 2, 2023
1 parent b8fbdb2 commit 2c1207c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pjmedia/src/pjmedia/transport_srtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ PJ_DEF(pj_status_t) pjmedia_srtp_init_lib(pjmedia_endpt *endpt)
if (err != srtp_err_status_ok) {
PJ_LOG(4, (THIS_FILE, "Failed to initialize libsrtp: %s",
get_libsrtp_errstr(err)));
pjmedia_srtp_deinit_lib(endpt);
return PJMEDIA_ERRNO_FROM_LIBSRTP(err);
}
}
Expand Down

0 comments on commit 2c1207c

Please sign in to comment.