renderonly: Fix potential NULL deref in the error path
scanout can be NULL.
Fixes: ad4d7ca833 ("kmsro: Fix renderonly_scanout BO aliasing")
Cc: mesa-stable
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23746>
This commit is contained in:
committed by
Marge Bot
parent
8087f784e4
commit
8568a46c1c
@@ -114,7 +114,7 @@ renderonly_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc,
|
||||
return scanout;
|
||||
|
||||
free_dumb:
|
||||
destroy_dumb.handle = scanout->handle;
|
||||
destroy_dumb.handle = create_dumb.handle;
|
||||
drmIoctl(ro->kms_fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_dumb);
|
||||
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user