mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix memory leak at handshake. 2.0.213
This commit is contained in:
parent
1214af643e
commit
6ec60b0a21
4 changed files with 13 additions and 2 deletions
|
@ -151,6 +151,11 @@ namespace _srs_internal
|
|||
}
|
||||
|
||||
SrsDH::~SrsDH()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void SrsDH::close()
|
||||
{
|
||||
if (pdh != NULL) {
|
||||
if (pdh->p != NULL) {
|
||||
|
@ -249,7 +254,9 @@ namespace _srs_internal
|
|||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
int32_t bits_count = 1024;
|
||||
int32_t bits_count = 1024;
|
||||
|
||||
close();
|
||||
|
||||
//1. Create the DH
|
||||
if ((pdh = DH_new()) == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue