X-Git-Url: https://rtime.felk.cvut.cz/gitweb/coffee/mt-apps.git/blobdiff_plain/8098e4d6015095f22b364f99d9e07d2bd357e287..ea09d8979808bb07a91bfd78d1498c9f87e4d863:/mt_server.c diff --git a/mt_server.c b/mt_server.c index fa099bb..f7315e1 100644 --- a/mt_server.c +++ b/mt_server.c @@ -81,6 +81,7 @@ void list_deinit(list *in) while (in->first) { list_remove(in); } + free(in); } static const struct lws_http_mount mount = { @@ -292,7 +293,8 @@ int mt_server_init(mt_server_t *self, struct ev_loop *loop, int fd) void mt_server_deinit(mt_server_t *self) { - list_deinit((list *)protocols[PROTOCOL_MERICA_TERMINAL].user); + free_line(self->fd_watcher.text); + list_deinit(self->fd_watcher.lines); lws_context_destroy(self->context); } @@ -311,6 +313,7 @@ int main(int argc, const char **argv) ev_run(loop, 0); mt_server_deinit(&server); + ev_loop_destroy(loop); return 0; }