From dd81b742f435acb6162a8cf37e7fa8b77c1e6128 Mon Sep 17 00:00:00 2001
From: Pedro Gonnet <gonnet@google.com>
Date: Mon, 11 Jan 2016 23:07:36 +0100
Subject: [PATCH] forgot to set 'res'.

---
 src/queue.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/queue.c b/src/queue.c
index 729ded8421..af84c4b1f5 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -212,6 +212,9 @@ struct task *queue_gettask(struct queue *q, const struct task *prev, int blockin
 
     /* Another one bites the dust. */
     const int qcount = q->count -= 1;
+    
+    /* Get a pointer on the task that we want to return. */
+    res = &qtasks[tid];
 
     /* Swap this task with the last task and re-heap. */
     int k = ind;
-- 
GitLab