[winealsa.drv] When allocating opaque blobs for alsa, initialize them to zero
dank at kegel.com
Thu Oct 13 13:14:18 CDT 2011
"valgrind is complaining because the snd_pcm_info struct actually
contains quite a few more fields than those three. Since we have only
an opaque pointer, there's not much we can do other than set
everything in the struct to zero at allocation time. That will
probably shut valgrind up. I'm not opposed to such a patch (use
HEAP_ZERO_MEMORY in the HeapAlloc(snd_pcm_info_sizeof() call).
[ The attached patch ] Looks fine to me."
Here's the patch that Andrew approved.
(IMHO this is a bit better than just telling valgrind to suppress the
variable references, since it guards against the off chance that we
don't set something alsa cares about.)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1259 bytes
Desc: not available
More information about the wine-patches