summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-12-11 19:56:42 -0800
committerEric Anholt <[email protected]>2014-12-11 21:31:27 -0800
commit87db578268012ffc7ca09b737441490144340c6e (patch)
tree3494958ea6e46341e58e611f6cf14f57b6a2c6eb /src/gallium/drivers
parent5069e4bd40d4e822340f787dd4d7ec1890c6c9da (diff)
vc4: Fix a memory leak in setting up QPU instructions for scheduling.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu_emit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c
index f2620c0a75f..c4359e718f5 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_emit.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c
@@ -26,6 +26,7 @@
#include "vc4_context.h"
#include "vc4_qir.h"
#include "vc4_qpu.h"
+#include "util/ralloc.h"
static void
vc4_dump_program(struct vc4_compile *c)
@@ -44,7 +45,7 @@ vc4_dump_program(struct vc4_compile *c)
static void
queue(struct vc4_compile *c, uint64_t inst)
{
- struct queued_qpu_inst *q = calloc(1, sizeof(*q));
+ struct queued_qpu_inst *q = rzalloc(c, struct queued_qpu_inst);
q->inst = inst;
insert_at_tail(&c->qpu_inst_list, &q->link);
}