msvcrtd: free mem after use (valgrind)

Nikolay Sivov bunglehead at gmail.com
Wed Dec 16 08:36:48 CST 2009


On 12/16/2009 17:25, 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);
>   }
>
>   /**********************************************************************/
>    
Pointer check is redundant in this case.



More information about the wine-devel mailing list