On Mi, 2009-12-09 at 16:57 +0100, Maarten Lankhorst wrote:
- {
/* FIXME: Still a memory leak.. */
This should be fixed before sending to wine-patches
Hi Detlef,
Detlef Riekenberg schreef:
On Mi, 2009-12-09 at 16:57 +0100, Maarten Lankhorst wrote:
- {
/* FIXME: Still a memory leak.. */
This should be fixed before sending to wine-patches
The original code had no way to handle it, and msdn doesn't mention how to handle this. The original code would leak 256 bytes and still be able to overflow, so I think this is still an improvement, considering the alternatives suck harder.
One way would be to put the wide versions of the strings in DSDRIVERDESC->pvReserved1/2 so we could do this without leaks and conversions, but since this will make it harder to just drop in an older wine driver to test if a problem goes away, I felt that keeping the leak is probably the least evil way to handle this, considering typically this code is only called once in the entire lifespan of a program at most. Most programs will use DSPROPERTY_Enumerate, which doesn't leak.
Cheers, Maarten.