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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user