From f96faabc73cacad0ab1b4d3aabd19e6ceb8d260e Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Wed, 2 Mar 2022 15:54:33 +0000 Subject: [PATCH] Cleanup statuses FossilOrigin-Name: fb6756b4bc28fc432660265beb01911fa5cd60150fc1db9ea4253020bedc836f --- src/account.c | 1 + src/status.c | 3 +++ src/timeline.c | 1 + 3 files changed, 5 insertions(+) diff --git a/src/account.c b/src/account.c index d361ad6..46df2db 100644 --- a/src/account.c +++ b/src/account.c @@ -105,5 +105,6 @@ void content_account(mastodont_t* api, char** data, size_t size) /* Cleanup */ mastodont_storage_cleanup(&storage); mastodont_storage_cleanup(&status_storage); + cleanup_statuses(statuses, status_len); if (cleanup) free(account_page); } diff --git a/src/status.c b/src/status.c index f0fc3ec..a22dc61 100644 --- a/src/status.c +++ b/src/status.c @@ -226,5 +226,8 @@ void content_status(mastodont_t* api, char** data, size_t data_size, int is_repl if (after_html) free(after_html); if (output) free(output); if (is_reply) free(stat_reply); + cleanup_statuses(statuses_before, stat_before_len); + cleanup_statuses(statuses_after, stat_after_len); + cleanup_status(&status); mastodont_storage_cleanup(&storage); } diff --git a/src/timeline.c b/src/timeline.c index dddafc0..ba2d0a2 100644 --- a/src/timeline.c +++ b/src/timeline.c @@ -74,6 +74,7 @@ void tl_public(mastodont_t* api, int local) // Cleanup mastodont_storage_cleanup(&storage); + cleanup_statuses(statuses, status_count); if (cleanup) free(status_format); if (post_box) free(post_box); if (output) free(output);