mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
nouveau: Fix null dereference in nouveau_pushbuf_destroy
This may happen if the Nouveau device fails to initialize before
the pushbuf is set up; the abort logic will call this either way.
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21611>
(cherry picked from commit 9de997bde6)
This commit is contained in:
parent
3a23a70875
commit
42a848a079
2 changed files with 3 additions and 1 deletions
|
|
@ -3496,7 +3496,7 @@
|
|||
"description": "nouveau: Fix null dereference in nouveau_pushbuf_destroy",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -241,6 +241,8 @@ nouveau_pushbuf_create(struct nouveau_screen *screen, struct nouveau_context *co
|
|||
void
|
||||
nouveau_pushbuf_destroy(struct nouveau_pushbuf **push)
|
||||
{
|
||||
if (!*push)
|
||||
return;
|
||||
FREE((*push)->user_priv);
|
||||
nouveau_pushbuf_del(push);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue