summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorAaron Watry <[email protected]>2013-11-14 12:17:42 -0600
committerTom Stellard <[email protected]>2013-11-15 09:53:31 -0800
commitdd73b99420de17651001e0a4d937f1f66fbef14c (patch)
tree33427a7db110038df195f62ac59abf9f41255e03 /src/gallium
parent2bc1680665473c648e8b75a98d77be7c3f07379d (diff)
r600/llvm: initialize radeon_llvm_binary
use memset to initialize to 0's... otherwise code_size and config_size could be uninitialized when read later in this method. It's also hard to do NULL checks on uninitialized pointers. Reviewed-by: Tom Stellard <[email protected]> v2: Fix indentation CC: "10.0" <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600_llvm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c
index a2ff0ec237d..f6784ebd148 100644
--- a/src/gallium/drivers/r600/r600_llvm.c
+++ b/src/gallium/drivers/r600/r600_llvm.c
@@ -831,6 +831,7 @@ unsigned r600_llvm_compile(
const char * gpu_family = r600_llvm_gpu_string(family);
unsigned i;
+ memset(&binary, 0, sizeof(struct radeon_llvm_binary));
r = radeon_llvm_compile(mod, &binary, gpu_family, dump);
assert(binary.code_size % 4 == 0);