aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-runserver
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-13 00:21:32 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-13 00:21:32 +0100
commitd0ff2cc37a18bfabc5aa7539045adb84442426a2 (patch)
treeaa0074108f9eafd82522817a117528500ce203b9 /src/blogc-runserver
parentdd8d43e8dee47bba294fa489a6f44bd2ac7000f7 (diff)
downloadblogc-d0ff2cc37a18bfabc5aa7539045adb84442426a2.tar.gz
blogc-d0ff2cc37a18bfabc5aa7539045adb84442426a2.tar.bz2
blogc-d0ff2cc37a18bfabc5aa7539045adb84442426a2.zip
runserver: fixed memory leak
this bug was reported by clang-analyzer.
Diffstat (limited to 'src/blogc-runserver')
-rw-r--r--src/blogc-runserver/httpd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/blogc-runserver/httpd.c b/src/blogc-runserver/httpd.c
index d1fc0e1..13b7800 100644
--- a/src/blogc-runserver/httpd.c
+++ b/src/blogc-runserver/httpd.c
@@ -374,6 +374,8 @@ br_httpd_run(const char *host, const char *port, const char *docroot,
if (threads[current_thread].initialized) {
if (pthread_join(threads[current_thread].thread, NULL) != 0) {
fprintf(stderr, "Failed to join thread\n");
+ free(arg->ip);
+ free(arg);
rv = 3;
goto cleanup;
}