diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-01-18 13:48:08 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-01-18 13:51:09 +0100 |
commit | d618141ea5161d05e388e9fbfa4148a6abd976b1 (patch) | |
tree | 37b726480aa4d350ed61bfb419adad30899e209f /daemon/trashlib/trashwatcher.c | |
parent | ee5a012c46868bdbea506f1ab1ba0b505b0d67a2 (diff) | |
download | gvfs-d618141ea5161d05e388e9fbfa4148a6abd976b1.tar.gz |
Avoid crash on race to mount gvfstrash
If the trash is already mounted (due to e.g. a race) when registering the
new trash backend we error out and free the trash backend. This caused
the g_assert_not_reached() in trash_watcher_free to hit.
Diffstat (limited to 'daemon/trashlib/trashwatcher.c')
-rw-r--r-- | daemon/trashlib/trashwatcher.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/daemon/trashlib/trashwatcher.c b/daemon/trashlib/trashwatcher.c index a2cabfdd..9661ce48 100644 --- a/daemon/trashlib/trashwatcher.c +++ b/daemon/trashlib/trashwatcher.c @@ -280,7 +280,10 @@ trash_watcher_new (TrashRoot *root) void trash_watcher_free (TrashWatcher *watcher) { - g_assert_not_reached (); + /* We just leak everything here, as this is not normally hit. + This used to be a g_assert_not_reached(), and that got hit when + mounting the trash backend failed due to the trash already being + mounted. */ } void |