dlls/oleaut32/tests/vartype.c: Fix invalid free (found by valgrind)

Jon Griffiths jon_p_griffiths at yahoo.com
Wed Jun 18 20:27:04 CDT 2008


Hi,

Hopefully this version is more acceptable than the last try. There's already a Get() function which casts BSTR's to their internal representation, so use that to get the correct memory ptr for the custom data.

Fixes valgrind warnings like:
 Invalid free() / delete / delete[]
    at  notify_free (heap.c:199)
    by  RtlFreeHeap (heap.c:1284)
    by  ClearCustData (typelib2.c:3912)
    by  test_ClearCustData (vartype.c:5786)
    by  func_vartype (vartype.c:6134)
    by  run_test (test.h:421)
    by  main (test.h:470)

Cheers
Jon



      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OLEAUT32_fix_vartype_vg.diff
Type: text/x-diff
Size: 617 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080618/6bd6f0ec/attachment-0001.diff 


More information about the wine-patches mailing list