[Pidgin] #16961: Finch 3.0 appears to leak incoming messages

Pidgin trac at pidgin.im
Thu Feb 18 13:29:37 EST 2016


#16961: Finch 3.0 appears to leak incoming messages
---------------------+---------------------------------
 Reporter:  elb      |      Owner:  sadrul
     Type:  defect   |     Status:  new
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:

 {{{
 #!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.

--
Ticket URL: <https://developer.pidgin.im/ticket/16961>
Pidgin <https://pidgin.im>
Pidgin


More information about the Tracker mailing list