st/egl: fix uninitialized pointer bug
authorBrian Paul <brianp@vmware.com>
Mon, 16 Jul 2012 20:14:07 +0000 (14:14 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 16 Jul 2012 22:03:31 +0000 (16:03 -0600)
If no format is matched in the loop the value of xconf was undefined.

NOTE: This is a candidate for the 8.0 branch.

src/gallium/state_trackers/egl/x11/native_ximage.c

index c0108fc552504a657d52200e8c1ab5609bfd0bbb..ae9c3b21356824e8ee0080e9443897ddef4667f4 100644 (file)
@@ -455,7 +455,7 @@ ximage_display_copy_to_pixmap(struct native_display *ndpy,
    if (src->bind & PIPE_BIND_DISPLAY_TARGET) {
       struct ximage_display *xdpy = ximage_display(ndpy);
       enum pipe_format fmt = get_pixmap_format(&xdpy->base, pix);
-      const struct ximage_config *xconf;
+      const struct ximage_config *xconf = NULL;
       struct xlib_drawable xdraw;
       int i;