Fix deadlock in threaded resolver
authorAlexander Larsson <alexl@redhat.com>
Fri, 15 May 2009 08:05:55 +0000 (10:05 +0200)
committerAlexander Larsson <alexl@redhat.com>
Fri, 15 May 2009 08:05:55 +0000 (10:05 +0200)
When you're using the threaded resolver and using a sync call
without a cancellable the resolve_sync forgot to unlock the
initial req->mutex lock, leading to a deadlock when unrefing
the request.

gio/gthreadedresolver.c

index 6732612e199174468389f2d2986db6f19fa38967..c259b572489620be140ee646a8d32909aa467bc4 100644 (file)
@@ -319,6 +319,7 @@ resolve_sync (GThreadedResolver         *gtr,
   if (!req->cancellable || !gtr->thread_pool)
     {
       req->resolve_func (req, error);
+      g_mutex_unlock (req->mutex);
       return;
     }