[10/10] shell32: Fix initial reference count for a new IAutoComplete instance.

Nikolay Sivov bunglehead at gmail.com
Wed Jan 19 04:02:21 CST 2011


On 1/15/2011 11:28, Andrew Nguyen wrote:
> Spotted with Valgrind.
> ---
>   dlls/shell32/autocomplete.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-
This doesn't look right. If initial count is zero this failure code will 
decrement to -1:

---
     if (FAILED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) {
     IUnknown_Release (_IUnknown_ (lpac));
     return E_NOINTERFACE;
     }
---

I think it's better to add another _Release().




More information about the wine-devel mailing list