sharing: Don't leak path

g_file_get_path() allocates new memory for path.
So using g_strdup() later would leak the previous allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=782045
This commit is contained in:
Mohammed Sadiq 2017-05-02 10:53:56 +05:30 committed by Bastien Nocera
parent aebf04f6f2
commit 4c0928f324

View file

@ -553,7 +553,7 @@ cc_sharing_panel_new_media_sharing_row (const char *uri_or_path,
G_CALLBACK (cc_sharing_panel_remove_folder), self);
g_object_set_data (G_OBJECT (w), "row", row);
g_object_set_data_full (G_OBJECT (row), "path", g_strdup (path), g_free);
g_object_set_data_full (G_OBJECT (row), "path", path, g_free);
gtk_widget_show_all (row);