[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:
whatdoineed2do/Ray 2019-09-12 18:16:44 +01:00 committed by ejurgensen
parent c2ba1fdb63
commit 586dc4342d
1 changed files with 4 additions and 0 deletions

View File

@ -148,6 +148,10 @@ streaming_close_cb(struct evhttp_connection *evcon, void *arg)
if (session->require_icy)
--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);
if (!streaming_sessions)