summaryrefslogtreecommitdiff
path: root/src/glsl/ast.h
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-08-02 17:27:56 -0700
committerCarl Worth <cworth@cworth.org>2010-08-02 17:27:56 -0700
commit1575070bfeedbc7decb7e44ac81abaeec0497a07 (patch)
tree04012ac44b23c94a35dcb5ed8878136cacf3834b /src/glsl/ast.h
parent42f3e7b6d7b42218feafe85a2328d8ce86fcce93 (diff)
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.
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r--src/glsl/ast.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 1de285bb46..7ce879bb79 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -42,7 +42,7 @@ public:
{
void *node;
- node = talloc_size(ctx, size);
+ node = talloc_zero_size(ctx, size);
assert(node != NULL);
return node;