Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 607523d1 authored by Dave Airlie's avatar Dave Airlie Committed by Alex Deucher
Browse files

drm/amdgpu: fix parser init error path to avoid crash in parser fini



If we don't reset the chunk info in the error path, the subsequent
fini path will double free.

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d8a8ed97
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -240,6 +240,8 @@ int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
	for (; i >= 0; i--)
		drm_free_large(p->chunks[i].kdata);
	kfree(p->chunks);
	p->chunks = NULL;
	p->nchunks = 0;
put_ctx:
	amdgpu_ctx_put(p->ctx);
free_chunk: