1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #826, fix memory leak in streamCasterFlv (#836)

This commit is contained in:
haofz 2017-04-15 16:56:28 +08:00 committed by winlin
parent 8d35585c13
commit 52b6823a90

View file

@ -86,6 +86,11 @@ void SrsAppCasterFlv::remove(SrsConnection* c)
if ((it = std::find(conns.begin(), conns.end(), c)) != conns.end()) {
conns.erase(it);
}
// fixbug: SrsHttpConn for CasterFlv is not freed, which could cause memory leak
// so, free conn which is not managed by SrsServer->conns;
// @see: https://github.com/ossrs/srs/issues/826
srs_freep(c);
}
int SrsAppCasterFlv::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)