summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorAaron Watry <awatry@gmail.com>2013-11-14 12:17:42 -0600
committerIan Romanick <ian.d.romanick@intel.com>2013-11-15 13:39:41 -0800
commitf843604b6a71a9809db8839d36750fbbdec25bc1 (patch)
treedaa22b6c8882787802bfc5e75142a4cb4667fb44 /src/gallium
parente9f8b782788f4f1b27fb2015b1cf226660a17271 (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 <thomas.stellard@amd.com> v2: Fix indentation CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit dd73b99420de17651001e0a4d937f1f66fbef14c)
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 5afe3cb51f7..7786282a839 100644
--- a/src/gallium/drivers/r600/r600_llvm.c
+++ b/src/gallium/drivers/r600/r600_llvm.c
@@ -712,6 +712,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);