OSDN Git Service

Fixes bugzilla #1730.
authorIan Romanick <idr@us.ibm.com>
Fri, 5 Aug 2005 23:13:13 +0000 (23:13 +0000)
committerIan Romanick <idr@us.ibm.com>
Fri, 5 Aug 2005 23:13:13 +0000 (23:13 +0000)
Make sure that all the values used in the clean-up code are initialized at
some point.  It is still unclear to me as to why GCC does not complain.  I
suspect the problem may be due to the depth of if-statement nesting.

src/glx/x11/glxext.c

index bb6d6cc..52c113d 100644 (file)
@@ -728,7 +728,7 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc,
     __DRIscreenPrivate *psp = NULL;
 #ifndef GLX_USE_APPLEGL
     drm_handle_t hSAREA;
-    drmAddress pSAREA;
+    drmAddress pSAREA = MAP_FAILED;
     char *BusID;
     __DRIversion   ddx_version;
     __DRIversion   dri_version;
@@ -749,6 +749,7 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc,
     err_msg = "XF86DRIOpenConnection";
     err_extra = NULL;
 
+    framebuffer.base = MAP_FAILED;
     framebuffer.dev_priv = NULL;
 
     if (XF86DRIOpenConnection(dpy, scrn, &hSAREA, &BusID)) {