gallium/rbug: unlock a mutex in rbug_create_query
authorMarek Olšák <marek.olsak@amd.com>
Mon, 22 Sep 2014 20:12:10 +0000 (22:12 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 24 Sep 2014 12:48:02 +0000 (14:48 +0200)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/rbug/rbug_context.c

index 71bc2168614042c06f20e115ebccc3bc17027e2d..026c132786a016d61d9485522530b97f62723ddf 100644 (file)
@@ -141,12 +141,14 @@ rbug_create_query(struct pipe_context *_pipe,
 {
    struct rbug_context *rb_pipe = rbug_context(_pipe);
    struct pipe_context *pipe = rb_pipe->pipe;
+   struct pipe_query *query;
 
    pipe_mutex_lock(rb_pipe->call_mutex);
-   return pipe->create_query(pipe,
-                             query_type,
-                             index);
+   query = pipe->create_query(pipe,
+                              query_type,
+                              index);
    pipe_mutex_unlock(rb_pipe->call_mutex);
+   return query;
 }
 
 static void