projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42f3e7b
)
glsl2: Use talloc_zero_size instead of talloc_size to allocate ast_node objects.
author
Carl Worth
<cworth@cworth.org>
Tue, 3 Aug 2010 00:27:56 +0000
(17:27 -0700)
committer
Carl Worth
<cworth@cworth.org>
Tue, 3 Aug 2010 00:27:56 +0000
(17:27 -0700)
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.
src/glsl/ast.h
patch
|
blob
|
history
diff --git
a/src/glsl/ast.h
b/src/glsl/ast.h
index 1de285bb46102f61e463cda9f54441078ba8b795..7ce879bb79ddea2897e5f6b97a20205882a1d1ed 100644
(file)
--- 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;