From d750371c7e15a26fac91180080448f0ad3a86dd0 Mon Sep 17 00:00:00 2001 From: nekobit Date: Mon, 13 Jun 2022 06:33:54 +0000 Subject: [PATCH] Upload cleanup lists func FossilOrigin-Name: 2c93bcb9b03ff0d6d74c77bec711d3c387bbaa4b4ed9e74ed8a67378229e7d8b --- include/mastodont_list.h | 2 +- src/list.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/mastodont_list.h b/include/mastodont_list.h index 6fd3a3d..1833bbd 100644 --- a/include/mastodont_list.h +++ b/include/mastodont_list.h @@ -94,6 +94,6 @@ int mastodont_list_remove_accounts(mastodont_t* api, struct mstdnt_storage* storage); // Cleanup -void mstdnt_cleanup_lists(struct mstdnt_list* lists, size_t len); +void mstdnt_cleanup_lists(struct mstdnt_list* lists); #endif /* MASTODONT_LIST_H */ diff --git a/src/list.c b/src/list.c index 978e865..49e4dfb 100644 --- a/src/list.c +++ b/src/list.c @@ -305,8 +305,7 @@ int mastodont_list_get_accounts(mastodont_t* data, return mastodont_request(data, &req_args); } -void mstdnt_cleanup_lists(struct mstdnt_list* lists, size_t len) +void mstdnt_cleanup_lists(struct mstdnt_list* lists) { - if (!lists) return; free(lists); }