mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
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:
parent
42f3e7b6d7
commit
1575070bfe
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ public:
|
|||
{
|
||||
void *node;
|
||||
|
||||
node = talloc_size(ctx, size);
|
||||
node = talloc_zero_size(ctx, size);
|
||||
assert(node != NULL);
|
||||
|
||||
return node;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue