Fri, 19 Aug 2022 01:00:48 -0500
Fix leaks from GtkFileChooser results
The return value of `gtk_file_chooser_get_file` and `g_file_get_path` are both transfer full, so they must be freed.
Testing Done:
Compiled only.
Reviewed at https://reviews.imfreedom.org/r/1610/
| pidgin/gtkwhiteboard.c | file | annotate | diff | comparison | revisions | |
| pidgin/pidginavatar.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/gtkwhiteboard.c Fri Aug 19 00:37:34 2022 -0500 +++ b/pidgin/gtkwhiteboard.c Fri Aug 19 01:00:48 2022 -0500 @@ -412,6 +412,7 @@ } g_free(filename); + g_object_unref(file); } g_object_unref(self);
--- a/pidgin/pidginavatar.c Fri Aug 19 00:37:34 2022 -0500 +++ b/pidgin/pidginavatar.c Fri Aug 19 01:00:48 2022 -0500 @@ -76,6 +76,7 @@ purple_buddy_icon_save_to_filename(icon, filename, NULL); g_free(filename); + g_object_unref(file); } gtk_native_dialog_destroy(native); @@ -142,6 +143,9 @@ purple_buddy_icons_node_set_custom_icon_from_file(node, filename); } + g_free(filename); + g_object_unref(file); + gtk_native_dialog_destroy(native); }