msvcrtd: free mem after use (valgrind)

André Hentschel nerv at dawncrow.de
Wed Dec 16 08:39:03 CST 2009


Paul Vriens schrieb:
> 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.
> 
Hi Paul and Nikolay,
you are right, i sent a try 2.
Thanks!

-- 

Best Regards, André Hentschel



More information about the wine-devel mailing list