Fix emoji name memleak

FossilOrigin-Name: fffec30d6351076827cd5685a9e8dd7dff79b1bdb46e6f02d966ff5a4ec5a2bd
This commit is contained in:
nekobit 2022-05-21 19:54:22 +00:00
parent 48c08f1f73
commit 8bad32ba99
2 changed files with 4 additions and 2 deletions

View file

@ -149,6 +149,6 @@ int main(void)
}
free_instance_info_cache();
mastodont_free(&api);
mastodont_cleanup(&api);
mastodont_global_curl_cleanup();
}

View file

@ -347,7 +347,8 @@ char* get_in_reply_to(mastodont_t* api, struct mstdnt_status* status, size_t* si
&storage);
char* html = construct_in_reply_to(status, res == 0 ? &acct : NULL, size);
if (res == 0) mstdnt_cleanup_account(&acct);
mastodont_storage_cleanup(&storage);
return html;
}
@ -589,6 +590,7 @@ char* construct_status(struct session* ssn,
if (size) *size = s;
// Cleanup
if (formatted_display_name != status->account.display_name) free(formatted_display_name);
if (interaction_btns) free(interaction_btns);
if (in_reply_to_str) free(in_reply_to_str);
if (attachments) free(attachments);