GNOME Bugzilla – Bug 760338
files-view: Fix double-free of file list in scripts menu
Last modified: 2016-01-13 14:55:53 UTC
See patch.
Created attachment 318557 [details] [review] files-view: Fix double-free of file list in scripts menu When building the scripts menu, update_directory_in_scripts_menu() gets the list of files in the script directory, filters out hidden files and sorts the filtered list by display name. Unlike the filtering step, which returns a new list with ref'ed files, sorting may change the start of the list, but not the list's actual content. As a result, the nautilus_file_list_free() call added in commit 864c815479a25 tries to free already freed memory (i.e. disposed files), resulting in a crash when any scripts are found.
Review of attachment 318557 [details] [review]: ugh right, oversight of mine. Thanks!
Attachment 318557 [details] pushed as b49246d - files-view: Fix double-free of file list in scripts menu