On 7/29/2010 22:21, David Hedberg wrote:
This is needed as we might, if passed an invalid riid, hit ::Release before we get to initialize array or item_count.
dlls/shell32/shellitem.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c index 5b01262..a7b2f29 100644 --- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -765,7 +765,7 @@ static HRESULT WINAPI IShellItemArray_Constructor(IUnknown *pUnkOuter, REFIID ri if(pUnkOuter) return CLASS_E_NOAGGREGATION;
- This = HeapAlloc(GetProcessHeap(), 0, sizeof(IShellItemArrayImpl));
- This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellItemArrayImpl)); if(!This) return E_OUTOFMEMORY;
I don't see a reason for this. If you want to zero two remaining fields do it explicitly. Also this helper doesn't need WINAPI it seems.
On Thu, Jul 29, 2010 at 9:16 PM, Nikolay Sivov bunglehead@gmail.com wrote:
I don't see a reason for this. If you want to zero two remaining fields do it explicitly. Also this helper doesn't need WINAPI it seems.
Ok, please ignore this one then, I'll try again.