Mesa (master): st/egl: fix uninitialized pointer bug
Brian Paul
brianp at kemper.freedesktop.org
Mon Jul 16 22:12:51 UTC 2012
Module: Mesa
Branch: master
Commit: fe2a7b7e7fca599659b1d248e160d480f2b92ba2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe2a7b7e7fca599659b1d248e160d480f2b92ba2
Author: Brian Paul <brianp at vmware.com>
Date: Mon Jul 16 14:14:07 2012 -0600
st/egl: fix uninitialized pointer bug
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 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gallium/state_trackers/egl/x11/native_ximage.c b/src/gallium/state_trackers/egl/x11/native_ximage.c
index c0108fc..ae9c3b2 100644
--- a/src/gallium/state_trackers/egl/x11/native_ximage.c
+++ b/src/gallium/state_trackers/egl/x11/native_ximage.c
@@ -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;
More information about the mesa-commit
mailing list