glsl2: Use talloc_zero_size instead of talloc_size to allocate ast_node objects.

This is a zero-ing function, (like calloc), to avoid bugs due to
accessing uninitialized values. Thanks to valgrind for noticing the
use of uninitialized values.
This commit is contained in:
Carl Worth
2010-08-02 17:27:56 -07:00
parent 42f3e7b6d7
commit 1575070bfe

View File

@@ -42,7 +42,7 @@ public:
{
void *node;
node = talloc_size(ctx, size);
node = talloc_zero_size(ctx, size);
assert(node != NULL);
return node;