diff options
author | Russell King <rmk@arm.linux.org.uk> | 2014-08-04 20:16:00 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-08-05 14:56:07 +0200 |
commit | 95b2cdf23223f1e0458d64b30408d21d240fadc6 (patch) | |
tree | 31f18d508d4d0972e468a810c00e8467892675aa | |
parent | 95e524cd35a28f14cdb2215e033ba1b96321103b (diff) | |
download | etna_viv-95b2cdf23223f1e0458d64b30408d21d240fadc6.tar.gz etna_viv-95b2cdf23223f1e0458d64b30408d21d240fadc6.tar.xz |
Avoid leaking context buffers in etna_free()
Testing on Dove reveals that the context buffers are leaked each time
Etnaviv is closed down. This is caused by the ifdef which surrounds
the call to enta_bo_del() always being false, and so the code to free
this buffer is never compiled.
Fix the ifdef, and also fix the code so that it builds.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r-- | src/etnaviv/etna.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etnaviv/etna.c b/src/etnaviv/etna.c index e35d32e..b78445d 100644 --- a/src/etnaviv/etna.c +++ b/src/etnaviv/etna.c @@ -355,9 +355,9 @@ int etna_free(struct etna_ctx *ctx) return ETNA_INVALID_ADDR; /* Free kernel command queue */ etna_queue_free(ctx->queue); -#ifdef GCABI_HAVE_CONTEXT +#ifdef GCABI_HAS_CONTEXT /* Free context buffer */ - etna_bo_del(ctx->conn, ctx->ctx_info, NULL); + etna_bo_del(ctx->conn, ctx->ctx_bo, NULL); #endif /* Free command buffers */ for(int x=0; x<NUM_COMMAND_BUFFERS; ++x) |