fixed memory leak in web_client_free()
Costa Tsaousis (ktsaou) committed
May 31, 2016 at 09:26 UTC
53cdf7e11726a61a5111f7da8fc24f12bc94619e
4 files changed
+6
src/web_client.c
+6
@@ -240,6 +240,12 @@ struct web_client *web_client_free(struct web_client *w)
240
241
debug(D_WEB_CLIENT_ACCESS, "%llu: Closing web client from %s port %s.", w->id, w->client_ip, w->client_port);
242
243
+#ifdef NETDATA_WITH_ZLIB
244
+ if(w->response.zinitialized) {
245
+ deflateEnd(&w->response.zstream);
246
+ }
247
+#endif // NETDATA_WITH_ZLIB
248
+
249
if(w->prev) w->prev->next = w->next;
250
if(w->next) w->next->prev = w->prev;
251
if(w->response.header_output) buffer_free(w->response.header_output);