提交 b7f6413a 编写于 作者: J Jerome Glisse 提交者: Dave Airlie

drm/radeon: avoid leaking const ib (not used yet on si and newer GPU)

Signed-off-by: NJerome Glisse <jglisse@redhat.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 43caf451
......@@ -161,6 +161,8 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data)
/* get chunks */
INIT_LIST_HEAD(&p->validated);
p->idx = 0;
p->ib = NULL;
p->const_ib = NULL;
p->chunk_ib_idx = -1;
p->chunk_relocs_idx = -1;
p->chunk_flags_idx = -1;
......@@ -325,6 +327,9 @@ static void radeon_cs_parser_fini(struct radeon_cs_parser *parser, int error)
kfree(parser->chunks);
kfree(parser->chunks_array);
radeon_ib_free(parser->rdev, &parser->ib);
if (parser->const_ib) {
radeon_ib_free(parser->rdev, &parser->const_ib);
}
}
static int radeon_cs_ib_chunk(struct radeon_device *rdev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册