mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 22:10:11 +01:00
radeonsi: avoid a use-after-free
Use of 'shader' after free was added in ac6fb2467f
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18356>
This commit is contained in:
parent
ffd3ef35bb
commit
e9cff8ed7f
1 changed files with 1 additions and 1 deletions
|
|
@ -3033,13 +3033,13 @@ static void si_init_shader_selector_async(void *job, void *gdata, int thread_ind
|
|||
|
||||
/* Compile the shader if it hasn't been loaded from the cache. */
|
||||
if (!si_compile_shader(sscreen, compiler, shader, debug)) {
|
||||
FREE(shader);
|
||||
fprintf(stderr,
|
||||
"radeonsi: can't compile a main shader part (type: %s, name: %s).\n"
|
||||
"This is probably a driver bug, please report "
|
||||
"it to https://gitlab.freedesktop.org/mesa/mesa/-/issues.\n",
|
||||
gl_shader_stage_name(shader->selector->stage),
|
||||
shader->selector->info.base.name);
|
||||
FREE(shader);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue