]> arthur.barton.de Git - netdata.git/commitdiff
fixed memory leak in web_client_free()
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 31 May 2016 06:26:29 +0000 (09:26 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 31 May 2016 06:26:29 +0000 (09:26 +0300)
src/web_client.c
system/netdata-init-d.in [changed mode: 0755->0644]
system/netdata-lsb.in [changed mode: 0755->0644]
system/netdata-openrc.in [changed mode: 0755->0644]

index b4e07ff48e7e33dba0802d9c6f0299d6d8c48040..a6831870d8ad4b65545dab74171f1a600557bc5c 100644 (file)
@@ -240,6 +240,12 @@ struct web_client *web_client_free(struct web_client *w)
 
        debug(D_WEB_CLIENT_ACCESS, "%llu: Closing web client from %s port %s.", w->id, w->client_ip, w->client_port);
 
+#ifdef NETDATA_WITH_ZLIB
+       if(w->response.zinitialized) {
+               deflateEnd(&w->response.zstream);
+       }
+#endif // NETDATA_WITH_ZLIB
+               
        if(w->prev)     w->prev->next = w->next;
        if(w->next) w->next->prev = w->prev;
        if(w->response.header_output) buffer_free(w->response.header_output);
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)