[PATCH] oledb32: free memory on error exit (Coverity)

Nikolay Sivov bunglehead at gmail.com
Sat Jun 13 02:00:24 CDT 2015


On 13.06.2015 8:54, Marcus Meissner wrote:
> 966609 Resource leak
> ---
>   dlls/oledb32/datainit.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/dlls/oledb32/datainit.c b/dlls/oledb32/datainit.c
> index 3c5293a..3a6c924 100644
> --- a/dlls/oledb32/datainit.c
> +++ b/dlls/oledb32/datainit.c
> @@ -520,6 +520,8 @@ static HRESULT get_dbpropset_from_proplist(struct dbprops *props, DBPROPSET **pr
>           if (FAILED(hr))
>           {
>               ERR("failed to init property %s value as type %d\n", debugstr_w(pair->name), descr->type);
> +            CoTaskMemFree(*propset);
> +            *propset = NULL;
>               return hr;
>           }
>
>

free_dbpropset() should be used for that, otherwise you'll still be 
leaking values.



More information about the wine-devel mailing list