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); }