From: Dave Airlie Date: Mon, 28 Sep 2009 05:37:25 +0000 (+1000) Subject: drm/r600: fix memory leak introduced with 64k malloc avoidance fix. X-Git-Tag: firefly_0821_release~11940^2~80 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4c57edba4588ddba40017fbde3cd356e600bdf80;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index ac7d93e2d5d5..06eab79c2eec 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);