Matteo Bruni : d3dcompiler: Fix initial allocation (Valgrind).
Alexandre Julliard
julliard at winehq.org
Mon Feb 21 10:56:57 CST 2011
Module: wine
Branch: master
Commit: 005910957be3d4bdb6479cad511357f0bfa1cd5d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=005910957be3d4bdb6479cad511357f0bfa1cd5d
Author: Matteo Bruni <mbruni at 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
{
More information about the wine-cvs
mailing list