GNOME Bugzilla – Bug 767577
Double-free compressing remote folder
Last modified: 2016-09-15 05:15:54 UTC
file-roller-3.20.2-1.fc24.x86_64 1. On an smb remote folder, I have a folder full of images 2. Right-click on the folder, choose to compress to cbz (note that you cannot use the default options, says you don't have rights to write to it, choose a local directory instead) 3. Assertion on a double-free: https://retrace.fedoraproject.org/faf/reports/1140565/ I cannot reproduce the bug under gdb or valgrind, but the file isn't actually created in the target directory.
It crashes when doing: g_free (data->tmp_dir); in xfer_data_free() But tmp_dir is a GFile, so g_object_unref() is the right call to make.
Created attachment 329683 [details] [review] Fix crash when compressing remote files Though the crash could possibly happen with any operation. Use the correct destructor for ->tmp_file, g_object_unref() rather than g_free().
That's enough to stop it crashing, but not enough to make it work. I'll file a separate bug about it.
Separate bugs for this are Bug 688714 and Bug 724497.
Review of attachment 329683 [details] [review]: ::: src/fr-command.c @@ +80,3 @@ _g_object_unref (data->base_dir); g_free (data->dest_dir); + g_object_unref (data->tmp_dir); You should use _g_object_unref, otherwise: (file-roller:14428): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
+ Trace 236348
Created attachment 329762 [details] [review] Fix crash when compressing remote files Though the crash could possibly happen with any operation. Use the correct destructor for ->tmp_file, _g_object_unref() rather than g_free().
(In reply to Bastien Nocera from comment #6) > Created attachment 329762 [details] [review] [review] > Fix crash when compressing remote files > > Though the crash could possibly happen with any operation. Use the > correct destructor for ->tmp_file, _g_object_unref() rather than > g_free(). pushed to master, thank you.