fixes http parser init

Thu, 31 Aug 2017 16:29:49 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 31 Aug 2017 16:29:49 +0200
changeset 183
f33974f0dce0
parent 182
b982cc285c40
child 193
aa8393527b1e

fixes http parser init

src/server/daemon/httpparser.c file | annotate | diff | comparison | revisions
--- a/src/server/daemon/httpparser.c	Wed Aug 30 22:05:56 2017 +0200
+++ b/src/server/daemon/httpparser.c	Thu Aug 31 16:29:49 2017 +0200
@@ -35,7 +35,7 @@
 
 
 HttpParser* http_parser_new(HTTPRequest *request) {
-    HttpParser *parser = malloc(sizeof(HttpParser));
+    HttpParser *parser = calloc(1, sizeof(HttpParser));
     parser->request = request;
     
     parser->state = 0;

mercurial