aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-03-05 01:34:33 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-03-05 01:35:11 +0100
commit326530ab1a26e2e09e2ab9143f9194eb96fc2829 (patch)
treebd05ef71a6dc37e219f6b353899638780ff7f20c
parentbda4570a0273cffb60ff63743110bc7a8026216b (diff)
downloadblogc-326530ab1a26e2e09e2ab9143f9194eb96fc2829.tar.gz
blogc-326530ab1a26e2e09e2ab9143f9194eb96fc2829.tar.bz2
blogc-326530ab1a26e2e09e2ab9143f9194eb96fc2829.zip
runserver: fixed memory leaks
-rw-r--r--src/blogc-runserver/httpd.c3
1 files changed, 3 insertions, 0 deletions
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);