mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +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
|
@ -340,6 +340,8 @@ Remark:
|
|||
|
||||
## History
|
||||
|
||||
* v2.0, 2016-09-05, fix memory leak at handshake. 2.0.213
|
||||
* v2.0, 2016-09-04, support valgrind for [patched st](https://github.com/ossrs/state-threads/issues/2).
|
||||
* v2.0, 2016-09-03, support all arm for [patched st](https://github.com/ossrs/state-threads/issues/1). 2.0.212
|
||||
* v2.0, 2016-09-01, workaround [#511][bug #511] the fly stfd in close. 2.0.211
|
||||
* v2.0, 2016-08-30, comment the pcr.
|
||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
// current release version
|
||||
#define VERSION_MAJOR 2
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 212
|
||||
#define VERSION_REVISION 213
|
||||
|
||||
// generated by configure, only macros.
|
||||
#include <srs_auto_headers.hpp>
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -59,6 +59,8 @@ namespace _srs_internal
|
|||
public:
|
||||
SrsDH();
|
||||
virtual ~SrsDH();
|
||||
private:
|
||||
virtual void close();
|
||||
public:
|
||||
/**
|
||||
* initialize dh, generate the public and private key.
|
||||
|
|
Loading…
Reference in a new issue