summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/r600_cs.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-09-28 05:37:25 (GMT)
committerDave Airlie <airlied@linux.ie>2009-09-28 05:37:25 (GMT)
commit4c57edba4588ddba40017fbde3cd356e600bdf80 (patch)
tree80c8c89ba2dc7092576dbe2de5bc6dc2612aabe5 /drivers/gpu/drm/radeon/r600_cs.c
parent74bf2ad508efa93db4254c9da9c7238da44e2c58 (diff)
downloadlinux-4c57edba4588ddba40017fbde3cd356e600bdf80.tar.xz
drm/r600: fix memory leak introduced with 64k malloc avoidance fix.
The legacy r600 path shares code, but doesn't share quite enough to get the freeing correct. Free the pages here also. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_cs.c')
-rw-r--r--drivers/gpu/drm/radeon/r600_cs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index ac7d93e..06eab79 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -722,6 +722,8 @@ static void r600_cs_parser_fini(struct radeon_cs_parser *parser, int error)
kfree(parser->relocs);
for (i = 0; i < parser->nchunks; i++) {
kfree(parser->chunks[i].kdata);
+ kfree(parser->chunks[i].kpage[0]);
+ kfree(parser->chunks[i].kpage[1]);
}
kfree(parser->chunks);
kfree(parser->chunks_array);