[Pidgin] #17292: Search results memory leak

Pidgin trac at pidgin.im
Thu Mar 8 04:55:06 EST 2018


#17292: Search results memory leak
--------------------+---------------------------
 Reporter:  dwmw2   |       Owner:  EionRobb
     Type:  patch   |      Status:  new
Milestone:  2.13.0  |   Component:  unclassified
  Version:  2.12.0  |  Resolution:
 Keywords:          |
--------------------+---------------------------

Comment (by dwmw2):

 Right, `g_value_set_static_string()` does not duplicate the string. It
 uses the copy in `data->results` that we were ''already'' keeping around
 for some reason. Now there's a reason :)

 The alternative would be to continue to use `g_value_set_string()`,
 refactor the code ''not'' to keep `data->results` around but to free it
 immediately... and embark on an investigation into why the
 ''(duplicated)'' strings aren't being eventually freed from the `GValue`
 as they should be.

 But this patch is simpler and, I believe, correct. I did see one weird
 crash in `searchresults_callback_wrapper_cb()` which made me look hard,
 but I think that was actually another bug in my own PRPL and I couldn't
 reproduce it.

--
Ticket URL: <https://developer.pidgin.im/ticket/17292#comment:5>
Pidgin <https://pidgin.im>
Pidgin


More information about the Tracker mailing list