OSDN Git Service

Add missing initialization of inOutFlags pointer.
authorCarl Worth <cworth@cworth.org>
Wed, 21 Jul 2010 20:26:26 +0000 (13:26 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 21 Jul 2010 20:26:26 +0000 (13:26 -0700)
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

index 955ee79..00c2c13 100644 (file)
@@ -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)