diff options
author | Mohammed Sadiq <sadiq@sadiqpk.org> | 2017-05-02 19:12:56 +0530 |
---|---|---|
committer | Ernestas Kulik <ernestask@gnome.org> | 2017-05-02 18:14:35 +0300 |
commit | 5decb46bab2beca384b00bca311d5f12b039d130 (patch) | |
tree | 7280e4cd2855c14b66315a4ae3e811233607d255 | |
parent | d0ebc338f674da600fadc69bd390af3134cef768 (diff) | |
download | nautilus-5decb46bab2beca384b00bca311d5f12b039d130.tar.gz |
files-view: Fix memory leak
nautilus_file_get_mime_type() returns a newly
allocated string, which should be freed when no longer
required.
using g_autofree() automatically frees the string fixing the leak
https://bugzilla.gnome.org/show_bug.cgi?id=782070
-rw-r--r-- | src/nautilus-files-view.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index 07b403707..b6974dbcc 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -1449,7 +1449,7 @@ choose_program (NautilusFilesView *view, GList *files) { GtkWidget *dialog; - gchar *mime_type; + g_autofree gchar *mime_type = NULL; GtkWindow *parent_window; g_assert (NAUTILUS_IS_FILES_VIEW (view)); |