Opened 3 years ago

Last modified 4 days ago

#16961 new defect

Finch 3.0 appears to leak incoming messages

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


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);
                                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);
                                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 (1)

comment:1 Changed 4 days ago by grim

  • Owner changed from sadrul to QuLogic
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!