mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-28 22:28:24 -04:00
[streaming] mem leak fix on client initiated disconnect; close callback cleans
up the session but not the evhhttp_request object alloc'd in httpd()-> event_base_loop() -> ... -> evhttp_request_new()
This commit is contained in:
parent
c2ba1fdb63
commit
586dc4342d
@ -148,6 +148,10 @@ streaming_close_cb(struct evhttp_connection *evcon, void *arg)
|
|||||||
if (session->require_icy)
|
if (session->require_icy)
|
||||||
--streaming_icy_clients;
|
--streaming_icy_clients;
|
||||||
|
|
||||||
|
/* Possible libevent bug; ownership of evhttp_request with libevent
|
||||||
|
* Workaround to force mem cleanup, prefered over evhttp_request_free()
|
||||||
|
*/
|
||||||
|
evhttp_send_reply_end(session->req);
|
||||||
free(session);
|
free(session);
|
||||||
|
|
||||||
if (!streaming_sessions)
|
if (!streaming_sessions)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user