From d68d55375931e8c693e1ffeb3b4daa8ad5d79ad3 Mon Sep 17 00:00:00 2001 From: nekobit Date: Thu, 25 Aug 2022 00:10:26 +0000 Subject: [PATCH] Cleanup chats, cleanup more perl stuff FossilOrigin-Name: 01a373542dd5377a14612fe998a346a7356a5197afbe07eed96ffbb1e53ae4d2 --- src/conversations.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/conversations.c b/src/conversations.c index 2dd686e..9f468ec 100644 --- a/src/conversations.c +++ b/src/conversations.c @@ -70,7 +70,7 @@ void content_chats(PATH_ARGS) // Cleanup mastodont_storage_cleanup(&storage); - // TOOD cleanup chats + mstdnt_cleanup_chats(chats, chats_len); Safefree(dup); } @@ -102,10 +102,10 @@ void content_chat_view(PATH_ARGS) XPUSHs(newRV_noinc((SV*)session_hv)); XPUSHs(newRV_noinc((SV*)template_files)); if (chat_code == 0) - XPUSHs(newRV_noinc((SV*)perlify_chat(&chat))); + mXPUSHs(newRV_noinc((SV*)perlify_chat(&chat))); else ARG_UNDEFINED(); if (messages) - XPUSHs(newRV_noinc((SV*)perlify_messages(messages, messages_len))); + mXPUSHs(newRV_noinc((SV*)perlify_messages(messages, messages_len))); else ARG_UNDEFINED(); PERL_STACK_SCALAR_CALL("chat::construct_chat"); @@ -125,6 +125,8 @@ void content_chat_view(PATH_ARGS) mastodont_storage_cleanup(&storage); mastodont_storage_cleanup(&storage_chat); + mstdnt_cleanup_chats(chats); + mstdnt_cleanup_messages(messages); Safefree(dup); }