Mesa (master): Add missing initialization of inOutFlags pointer.

Carl Worth cworth at kemper.freedesktop.org
Wed Jul 21 20:29:41 UTC 2010


Module: Mesa
Branch: master
Commit: 19e3771cff8e68fab88f06681d381ba3dad6c3ae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=19e3771cff8e68fab88f06681d381ba3dad6c3ae

Author: Carl Worth <cworth at cworth.org>
Date:   Wed Jul 21 13:26:26 2010 -0700

Add missing initialization of inOutFlags pointer.

This quiets a compiler warning, (and ensures a segmentation fault rather
than memory corruption if this variable is written through before being
initialized elsewhere).

---

 src/mesa/slang/slang_link.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/slang/slang_link.c b/src/mesa/slang/slang_link.c
index 955ee79..00c2c13 100644
--- a/src/mesa/slang/slang_link.c
+++ b/src/mesa/slang/slang_link.c
@@ -222,7 +222,7 @@ link_varying_vars(GLcontext *ctx,
                   struct gl_shader_program *shProg, struct gl_program *prog)
 {
    GLuint *map, i, firstSrcVarying, firstDstVarying, newSrcFile, newDstFile;
-   GLbitfield *inOutFlags;
+   GLbitfield *inOutFlags = NULL;
 
    map = (GLuint *) malloc(prog->Varying->NumParameters * sizeof(GLuint));
    if (!map)




More information about the mesa-commit mailing list