Fix some valgrind complaints
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 10 May 2005 18:22:19 +0000 (18:22 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 10 May 2005 18:22:19 +0000 (18:22 +0000)
src/mesa/shader/program.c

index a375805052d6999f3f50116b93781ee47ff79034..1e2d34a3079a8b54f98e237ba49e4aba434d93e2 100644 (file)
@@ -408,6 +408,10 @@ add_parameter(struct program_parameter_list *paramList,
    }
    else {
       paramList->NumParameters = n + 1;
+
+      _mesa_memset(&paramList->Parameters[n], 0, 
+                  sizeof(struct program_parameter));
+
       paramList->Parameters[n].Name = name ? _mesa_strdup(name) : NULL;
       paramList->Parameters[n].Type = type;
       if (values)