On 17-01-12 14:33:01, Daniel Stone wrote:
On 12 January 2017 at 14:32, Daniel Stone <dan...@fooishbar.org> wrote:
If allocated, this image is just leaked, along with its reference on
the BO. Same problem in gbm_dri_bo_get_handle_for_plane.
... and gbm_dri_bo_get_offset.
Cheers,
Daniel
Does this work (compile tested only)?
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 656fef3481..3c44c24d81 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -684,6 +684,9 @@ gbm_dri_bo_get_stride(struct gbm_bo *_bo, int plane)
dri->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &stride);
+ if (image != bo->image)
+ dri->image->destroyImage(image);
+
return (uint32_t)stride;
}
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev