summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2014-12-11 16:50:39 +0900
committerKeith Packard <keithp@keithp.com>2014-12-11 19:36:31 -0800
commitc8d4c0a25dba49d1486761438b96374672b29645 (patch)
treed2bad123a3091175604c16aed8803dfa0ee1361a
parent0355e280a39dee68981b2cbebfa2573cfde2f5bd (diff)
glamor: Make glamor_destroy_textured_pixmap idempotent
For robustness against drivers which may call both glamor_(egl_)destroy_textured_pixmap and glamor_destroy_pixmap. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--glamor/glamor.c1
-rw-r--r--glamor/glamor_fbo.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index cbd0e02ad..d1aa1cfb0 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -226,6 +226,7 @@ glamor_destroy_textured_pixmap(PixmapPtr pixmap)
glamor_egl_destroy_pixmap_image(pixmap);
#endif
glamor_pixmap_destroy_fbo(pixmap_priv);
+ glamor_set_pixmap_private(pixmap, NULL);
}
}
}
diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
index 42738268c..d2aabb21c 100644
--- a/glamor/glamor_fbo.c
+++ b/glamor/glamor_fbo.c
@@ -540,8 +540,6 @@ glamor_pixmap_destroy_fbo(glamor_pixmap_private *priv)
if (fbo)
glamor_destroy_fbo(fbo);
}
-
- free(priv);
}
Bool