From 326530ab1a26e2e09e2ab9143f9194eb96fc2829 Mon Sep 17 00:00:00 2001
From: "Rafael G. Martins" <rafael@rafaelmartins.eng.br>
Date: Sun, 5 Mar 2017 01:34:33 +0100
Subject: runserver: fixed memory leaks

---
 src/blogc-runserver/httpd.c | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/blogc-runserver')

diff --git a/src/blogc-runserver/httpd.c b/src/blogc-runserver/httpd.c
index af531b0..d95278d 100644
--- a/src/blogc-runserver/httpd.c
+++ b/src/blogc-runserver/httpd.c
@@ -190,6 +190,7 @@ handle_request(void *arg)
     if (write(client_socket, contents, len) == -1) {
         // do nothing, just avoid warnig
     }
+    free(contents);
 
 point3:
     free(real_root);
@@ -198,6 +199,8 @@ point2:
 point1:
     fprintf(stderr, "[Thread-%zu] %s - - \"%s\" %d\n", thread_id + 1,
         ip, conn_line, status_code);
+    free(path);
+    free(conn_line);
     bc_strv_free(pieces);
 point0:
     free(ip);
-- 
cgit v1.2.3-18-g5258