Просмотр исходного кода

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>
Dave Airlie 16 лет назад
Родитель
Сommit
4c57edba45
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      drivers/gpu/drm/radeon/r600_cs.c

+ 2 - 0
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);
 	kfree(parser->relocs);
 	for (i = 0; i < parser->nchunks; i++) {
 	for (i = 0; i < parser->nchunks; i++) {
 		kfree(parser->chunks[i].kdata);
 		kfree(parser->chunks[i].kdata);
+		kfree(parser->chunks[i].kpage[0]);
+		kfree(parser->chunks[i].kpage[1]);
 	}
 	}
 	kfree(parser->chunks);
 	kfree(parser->chunks);
 	kfree(parser->chunks_array);
 	kfree(parser->chunks_array);