sna: Discard GPU bo when failing to setup the shared pixmap
If we fail to mmap the pixmap when preparing it for use with prime, be sure to throw away the now lost priv->gpu_bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
c0f31d822a
commit
0d18b39565
|
|
@ -1183,6 +1183,7 @@ sna_create_pixmap_shared(struct sna *sna, ScreenPtr screen,
|
|||
pixmap->devPrivate.ptr =
|
||||
kgem_bo_map__async(&sna->kgem, priv->gpu_bo);
|
||||
if (pixmap->devPrivate.ptr == NULL) {
|
||||
kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
|
||||
free(priv);
|
||||
FreePixmap(pixmap);
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue