From 38230e38eeead431db1016fda9727ab0686a8699 Mon Sep 17 00:00:00 2001 From: nekobit Date: Mon, 13 Jun 2022 06:33:40 +0000 Subject: [PATCH] Update lists reference FossilOrigin-Name: 0f58996df8b3b3237bea71d39db5ef350eaef1b2ab7fac4fa83df82d1788fbe4 --- src/lists.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lists.c b/src/lists.c index 48d6745..49e995d 100644 --- a/src/lists.c +++ b/src/lists.c @@ -62,13 +62,13 @@ char* construct_lists_view(char* lists_string, size_t* size) void content_lists(struct session* ssn, mastodont_t* api, char** data) { - struct mstdnt_list* lists; + struct mstdnt_list* lists = NULL; size_t size_list = 0; struct mstdnt_storage storage = { 0 }; char* lists_format = NULL; char* lists_page = NULL; - if (mastodont_get_lists(api, &lists, &storage, &size_list)) + if (mastodont_get_lists(api, &storage, &lists, &size_list)) { lists_page = construct_error(storage.error, E_ERROR, 1, NULL); } @@ -92,4 +92,5 @@ void content_lists(struct session* ssn, mastodont_t* api, char** data) mastodont_storage_cleanup(&storage); if (lists_format) free(lists_format); if (lists_page) free(lists_page); + mstdnt_cleanup_lists(lists); }