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:
@@ -42,7 +42,7 @@ public:
|
|||||||
{
|
{
|
||||||
void *node;
|
void *node;
|
||||||
|
|
||||||
node = talloc_size(ctx, size);
|
node = talloc_zero_size(ctx, size);
|
||||||
assert(node != NULL);
|
assert(node != NULL);
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
|
Reference in New Issue
Block a user