src/server/daemon/httplistener.c

changeset 112
b962d83124bc
parent 111
c93be34fde76
child 115
51d9a15eac98
--- a/src/server/daemon/httplistener.c	Tue Nov 10 21:11:06 2015 +0100
+++ b/src/server/daemon/httplistener.c	Tue Nov 10 21:18:51 2015 +0100
@@ -79,7 +79,7 @@
         return http_listener_new(conf);
     }
     
-    HttpListener* newls = malloc(sizeof(HttpListener));
+    HttpListener* newls = calloc(1, sizeof(HttpListener));
     if(newls == NULL) {
         // TODO: error
     }
@@ -329,6 +329,7 @@
                 conn->close = connection_ssl_close;
             }
         } else {
+            conn->ssl = NULL;
             conn->read = connection_read;
             conn->write = connection_write;
             conn->close = connection_close;

mercurial