1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-14 12:21:55 +00:00

Fix #1524, memory leak for amf0 strict array. 3.0.75

This commit is contained in:
winlin 2019-12-19 14:39:34 +08:00
parent 1e4f22f83d
commit 49c737f996
4 changed files with 12 additions and 10 deletions

View file

@ -145,6 +145,7 @@ For previous versions, please read:
## V3 changes
* v3.0, 2019-12-19, Fix [#1524][bug #1524], memory leak for amf0 strict array. 3.0.75
* v3.0, 2019-12-19, Fix random build failed bug for modules.
* v3.0, 2019-12-19, Fix [#1520][bug #1520] and [#1223][bug #1223], bug for origin cluster 3+ servers. 3.0.74
* v3.0, 2019-12-18, For [#1042][bug #1042], add test for RAW AVC protocol.
@ -1510,6 +1511,7 @@ Winlin
[bug #1339]: https://github.com/ossrs/srs/pull/1339
[bug #1312]: https://github.com/ossrs/srs/pull/1312
[bug #1304]: https://github.com/ossrs/srs/pull/1304
[bug #1524]: https://github.com/ossrs/srs/issues/1524
[bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx
[bug #735]: https://github.com/ossrs/srs/issues/735

View file

@ -27,7 +27,7 @@
// The version config.
#define VERSION_MAJOR 3
#define VERSION_MINOR 0
#define VERSION_REVISION 74
#define VERSION_REVISION 75
// The macros generated by configure script.
#include <srs_auto_headers.hpp>

View file

@ -1030,12 +1030,7 @@ SrsAmf0StrictArray::SrsAmf0StrictArray()
SrsAmf0StrictArray::~SrsAmf0StrictArray()
{
std::vector<SrsAmf0Any*>::iterator it;
for (it = properties.begin(); it != properties.end(); ++it) {
SrsAmf0Any* any = *it;
srs_freep(any);
}
properties.clear();
clear();
}
int SrsAmf0StrictArray::total_size()
@ -1147,6 +1142,11 @@ SrsJsonAny* SrsAmf0StrictArray::to_json()
void SrsAmf0StrictArray::clear()
{
std::vector<SrsAmf0Any*>::iterator it;
for (it = properties.begin(); it != properties.end(); ++it) {
SrsAmf0Any* any = *it;
srs_freep(any);
}
properties.clear();
}

View file

@ -356,7 +356,7 @@ public:
* convert amf0 to json.
*/
virtual SrsJsonAny* to_json();
// properties iteration
// properties iteration
public:
/**
* clear all propergies.
@ -447,7 +447,7 @@ public:
* convert amf0 to json.
*/
virtual SrsJsonAny* to_json();
// properties iteration
// properties iteration
public:
/**
* clear all propergies.
@ -532,7 +532,7 @@ public:
* convert amf0 to json.
*/
virtual SrsJsonAny* to_json();
// properties iteration
// properties iteration
public:
/**
* clear all elements.