From 069c975377e2b75e416f2d04bdd44510e6d1ccc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Fri, 28 Jun 2019 15:38:22 +0200 Subject: [PATCH] chatty_conv_parse_message: Plug a leak chatty_conv_parse_message() transfers ownership to the caller so make sure the (currently only) caller frees it. --- src/chatty-buddy-list.c | 2 +- src/chatty-conversation.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chatty-buddy-list.c b/src/chatty-buddy-list.c index d29655d2..fd90df57 100644 --- a/src/chatty-buddy-list.c +++ b/src/chatty-buddy-list.c @@ -2147,7 +2147,7 @@ chatty_blist_update_buddy (PurpleBuddyList *list, PurpleBlistNode *node) { PurpleBuddy *buddy; - ChattyLog *log_data = NULL; + g_autofree ChattyLog *log_data = NULL; ChattyBlistNode *ui; g_return_if_fail (PURPLE_BLIST_NODE_IS_BUDDY(node)); diff --git a/src/chatty-conversation.c b/src/chatty-conversation.c index ecad7954..e6fac094 100644 --- a/src/chatty-conversation.c +++ b/src/chatty-conversation.c @@ -969,6 +969,7 @@ chatty_conv_parse_message (const gchar* msg) * * Get the last message from log * + * Returns: (transfer-full): a #ChattyLog */ ChattyLog* chatty_conv_message_get_last_msg (PurpleBuddy *buddy) -- GitLab