mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix #1524, memory leak for amf0 strict array. 3.0.75
This commit is contained in:
parent
1e4f22f83d
commit
49c737f996
4 changed files with 12 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue