Fix double-free crashes. See https://bugzilla.redhat.com/show_bug.cgi?id=1808767 Signed-off-by: Alexei Podtelezhnikov <apodtele@xxxxxxxxx> --- src/sna/kgem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 6a35067c..76bb1599 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -3079,6 +3079,9 @@ static void kgem_buffer_release(struct kgem *kgem, struct kgem_buffer *bo) assert(cached != &bo->base); list_del(&cached->vma); + if (!cached->map__gtt) + continue; + assert(*(struct kgem_bo **)cached->map__gtt == cached); *(struct kgem_bo **)cached->map__gtt = NULL; cached->map__gtt = NULL; -- 2.26.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx