GNOME Bugzilla – Bug 782202
linkbutton: Fix memory leak
Last modified: 2017-05-05 09:34:08 UTC
strings returned by gtk_widget_get_tooltip_text() and gtk_widget_get_tooltip_markup() has to be freed when no longer required.
Created attachment 351149 [details] [review] linkbutton: Fix memory leak
*** Bug 782201 has been marked as a duplicate of this bug. ***
This patch is against git master. That is, gtk4. I have failed to build gtk+ master (using jhbuild make). So all I have is hope that this patch won't break build. :) Thanks
Review of attachment 351149 [details] [review]: LGTM except for that nitpick ::: gtk/gtklinkbutton.c @@ +609,3 @@ + if (text == NULL + && markup == NULL + && label && *label != '\0' && uri && strcmp (label, uri) != 0) I know you didn't cause this, but now that you change those lines anyway: Can you put the && at the end of the previous line, like the other code does it?
Created attachment 351162 [details] [review] linkbutton: Fix memory leak strings returned by gtk_widget_get_tooltip_text() and gtk_widget_get_tooltip_markup() has to be freed when no longer required.
Pushed as commit 00cd92ea71eae5d272f6f7cca58d71a29334ca4c. Thanks!
This only frees if the if condition evaluates to false. Isn't that wrong?
(In reply to Daniel Boles from comment #7) > This only frees if the if condition evaluates to false. Isn't that wrong? ...please ignore me. I have now woken up