GNOME Bugzilla – Bug 685909
[PATCH] Crash in gphoto2
Last modified: 2012-10-11 09:26:19 UTC
This is downstream bug https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/984993 It seems that g_mutex_clear is being called on the gphoto2 backend's mutex twice. This could happen if a mount failed, because release_device() will get called twice in that case. Most of release_device() works fine when called twice. Just not the mutex bit. Really, the mutex shouldn't be cleared in that function. It's initialized in _init, and just because one mount failed, doesn't mean a future mount won't succeed. So we might need the mutex in the future. Even if that weren't the case, there's no harm in keeping the mutex around until finalize, where it will only be cleared once. So that's what the following patch does.
Created attachment 226197 [details] [review] Proposed patch
Pushed to master and gnome-3-6.