[Mesa-dev] [PATCH] Fix segmentation fault

YoungSun Park cathy.park at lge.com
Wed Oct 10 19:49:32 PDT 2012


The function segfaulted when a qtwayland on kms executed.
It is miss to copy dri_format of __DRIimage in dri2_dup_image().

Signed-off-by: YoungSun Park <cathy.park at lge.com>
---
 src/gallium/state_trackers/dri/drm/dri2.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 2f83dab..caf3745 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -640,6 +640,7 @@ dri2_dup_image(__DRIimage *image, void *loaderPrivate)
    img->dri_components = image->dri_components;
    img->loader_private = loaderPrivate;
 
+   img->dri_format = image->dri_format;
    return img;
 }
 
-- 
1.7.9.5



More information about the mesa-dev mailing list