[PATCH] oleaut32: Don't clear BSTR size

Andrew Eikum aeikum at codeweavers.com
Tue Jan 5 13:38:21 CST 2016


The size is used during cache lookup. Clearing it will break lookup
and prevent detection of double-freeing when warn+heap is enabled.

Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
---
 dlls/oleaut32/oleaut.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
index 78cb083..214421c 100644
--- a/dlls/oleaut32/oleaut.c
+++ b/dlls/oleaut32/oleaut.c
@@ -277,7 +277,6 @@ void WINAPI SysFreeString(BSTR str)
 
             if(WARN_ON(heap)) {
                 unsigned n = bstr_alloc_size(bstr->size) / sizeof(DWORD) - 1;
-                bstr->size = ARENA_FREE_FILLER;
                 for(i=0; i<n; i++)
                     bstr->u.dwptr[i] = ARENA_FREE_FILLER;
             }
-- 
2.6.4




More information about the wine-patches mailing list