Module: wine Branch: master Commit: 005910957be3d4bdb6479cad511357f0bfa1cd5d URL: http://source.winehq.org/git/wine.git/?a=commit;h=005910957be3d4bdb6479cad51...
Author: Matteo Bruni mbruni@codeweavers.com Date: Mon Feb 7 14:35:37 2011 +0100
d3dcompiler: Fix initial allocation (Valgrind).
---
dlls/d3dcompiler_43/compiler.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c index 42ad09b..8527870 100644 --- a/dlls/d3dcompiler_43/compiler.c +++ b/dlls/d3dcompiler_43/compiler.c @@ -206,13 +206,13 @@ static void *wpp_open_mem(const char *filename, int type) { if(includes_capacity == 0) { - includes = HeapAlloc(GetProcessHeap(), 0, INCLUDES_INITIAL_CAPACITY); + includes = HeapAlloc(GetProcessHeap(), 0, INCLUDES_INITIAL_CAPACITY * sizeof(*includes)); if(includes == NULL) { ERR("Error allocating memory for the loaded includes structure\n"); goto error; } - includes_capacity = INCLUDES_INITIAL_CAPACITY; + includes_capacity = INCLUDES_INITIAL_CAPACITY * sizeof(*includes); } else {