mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Support address sanitizer for utest and fix some leaks. (#3242)
* MP4: Fix memory leak when error. * Kernel: Support free global objects for utest. * HTTP: Fix memory leak when error. * MP4: Support more sample rate for audio. * RTMP: Support free field for utest. * UTest: Support address sanitizer.
This commit is contained in:
parent
be0241efdb
commit
368356c223
18 changed files with 360 additions and 154 deletions
|
@ -59,6 +59,13 @@ SrsResourceManager::~SrsResourceManager()
|
|||
|
||||
clear();
|
||||
|
||||
// Free all objects not in zombies.
|
||||
std::vector<ISrsResource*>::iterator it;
|
||||
for (it = conns_.begin(); it != conns_.end(); ++it) {
|
||||
ISrsResource* resource = *it;
|
||||
srs_freep(resource);
|
||||
}
|
||||
|
||||
srs_freepa(conns_level0_cache_);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue