msvcrtd: free mem after use (valgrind)

Paul Vriens paul.vriens.wine at gmail.com
Wed Dec 16 08:29:50 CST 2009


On 12/16/2009 03:25 PM, André Hentschel wrote:
> ---
>   dlls/msvcrtd/tests/debug.c |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/dlls/msvcrtd/tests/debug.c b/dlls/msvcrtd/tests/debug.c
> index 71f6e4c..dc89230 100644
> --- a/dlls/msvcrtd/tests/debug.c
> +++ b/dlls/msvcrtd/tests/debug.c
> @@ -60,6 +60,8 @@ static void test_new(void)
>
>     mem = pMSVCRTD_operator_new_dbg(42, _NORMAL_BLOCK, __FILE__, __LINE__);
>     ok(mem != NULL, "memory not allocated\n");
> +  if(mem != NULL)
> +    HeapFree(GetProcessHeap(), 0, mem);
>   }

Hi André,

There is no need to check before calling HeapFree.

-- 
Cheers,

Paul.



More information about the wine-devel mailing list