Opened 3 years ago

#16961 new defect

Finch 3.0 appears to leak incoming messages

Reported by: elb Owned by: sadrul
Milestone: 3.0.0 Component: finch (gnt/ncurses)
Version: 3.0.0hg Keywords: finch regression
Cc:

Description

In finch 3.0 f72e153dd417, the following appears in gntconv.c:

                gchar *msg_text = g_strdup(purple_message_get_contents(msg));

                if (purple_message_meify(msg_text, -1)) {
                        name = g_strdup_printf("*** %s", purple_message_get_author(msg));
                        if (!(flags & PURPLE_MESSAGE_SEND) &&
                                        (flags & PURPLE_MESSAGE_NICK))
                                msgflags = gnt_color_pair(color_message_highlight);
                        else
                                msgflags = gnt_color_pair(color_message_action);
                        me = TRUE;
                } else {
                        name =  g_strdup_printf("%s", purple_message_get_author(msg));
                        if (flags & PURPLE_MESSAGE_SEND)
                                msgflags = gnt_color_pair(color_message_send);
                        else if (flags & PURPLE_MESSAGE_NICK)
                                msgflags = gnt_color_pair(color_message_highlight);
                        else
                                msgflags = gnt_color_pair(color_message_receive);
                }
                purple_message_set_contents(msg, msg_text); /* might be "meified" */

I'm fairly certain that the opening purple_message_get_contents with g_strdup and the closing purple_message_set_contents represent a leak of the original message attached to this object, but someone more familiar with gobject semantics needs to look at this.

Change History (0)

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!