diff options
author | Mohammed Sadiq <sadiq@sadiqpk.org> | 2017-05-02 10:53:56 +0530 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-05-02 17:44:35 +0200 |
commit | 388b1164b2dad16ffa568be00397c69d51211311 (patch) | |
tree | 6592ef5ad7668318034a57388280e1a297324d19 | |
parent | 70f8afedb5c648aa1970a46cc55de0b33391f5b8 (diff) | |
download | gnome-control-center-388b1164b2dad16ffa568be00397c69d51211311.tar.gz |
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
-rw-r--r-- | panels/sharing/cc-sharing-panel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c index 236be1c79..2e98194ff 100644 --- a/panels/sharing/cc-sharing-panel.c +++ b/panels/sharing/cc-sharing-panel.c @@ -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); |