Module: Mesa
Branch: mesa_7_5_branch
Commit: dd4c142e90a0cba5b445990bb522ce9199d7f565
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd4c142e90a0cba5b445990bb522ce9199d7f565

Author: Brian Paul <[email protected]>
Date:   Mon May  4 07:52:55 2009 -0600

glx: replace Xmalloc() calls with Xcalloc()

Fixes a bug where psp->WaitX was uninitialized.  Reported by Chris Clayton.

---

 src/glx/x11/dri_glx.c   |    2 +-
 src/glx/x11/drisw_glx.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index 87d62ad..3ce410d 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -614,7 +614,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs 
*psc, int screen,
     char *driverName;
     int i;
 
-    psp = Xmalloc(sizeof *psp);
+    psp = Xcalloc(1, sizeof *psp);
     if (psp == NULL)
        return NULL;
 
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c
index 35bbd91..5e3d763 100644
--- a/src/glx/x11/drisw_glx.c
+++ b/src/glx/x11/drisw_glx.c
@@ -359,7 +359,7 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
    const char *driverName = "swrast";
    int i;
 
-   psp = Xmalloc(sizeof *psp);
+   psp = Xcalloc(1, sizeof *psp);
    if (psp == NULL)
       return NULL;
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to