From b156e298b583bfa6c921be24b7d3fd5dbec6c260 Mon Sep 17 00:00:00 2001 From: Falk Werner Date: Thu, 9 Jul 2020 22:35:15 +0200 Subject: [PATCH] fix: fixed memory leak --- lib/webfuse_provider/impl/message_writer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/webfuse_provider/impl/message_writer.c b/lib/webfuse_provider/impl/message_writer.c index b7fd77a..143cd9c 100644 --- a/lib/webfuse_provider/impl/message_writer.c +++ b/lib/webfuse_provider/impl/message_writer.c @@ -18,7 +18,7 @@ struct wfp_message_writer struct wfp_message_writer * wfp_impl_message_writer_create(int id) { - struct wfp_message_writer * writer = malloc(sizeof(writer)); + struct wfp_message_writer * writer = malloc(sizeof(struct wfp_message_writer)); writer->json_writer = wfp_impl_json_writer_create(1024, LWS_PRE); writer->id = id; writer->is_finished = false;