Skip to content

Fix crash when unmounting volumes#821

Open
yut23 wants to merge 1 commit into
IgnorantGuru:masterfrom
yut23:fix-unmount-crash
Open

Fix crash when unmounting volumes#821
yut23 wants to merge 1 commit into
IgnorantGuru:masterfrom
yut23:fix-unmount-crash

Conversation

@yut23

@yut23 yut23 commented Sep 28, 2024

Copy link
Copy Markdown

This was a use-after-free of monitor, which gets freed by vfs_dir_finalize():

spacefm/src/vfs/vfs-dir.c

Lines 228 to 233 in e6f2918

if ( dir->monitor )
{
vfs_file_monitor_remove( dir->monitor,
vfs_dir_monitor_callback,
dir );
}

I'm not sure why the VFSDir gets destroyed at that point, but it was probably some internal GLib change, as usual.

Fixes #819.

@morfikov

morfikov commented Oct 13, 2024

Copy link
Copy Markdown

@mati75
I can confirm that the patch works well.

@biopsin

biopsin commented May 3, 2025

Copy link
Copy Markdown

Tested and segfault on unmounting usb drives or other with a open tab no longer happens, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segfault

3 participants