[winealsa.drv] When allocating opaque blobs for alsa, initialize them to zero

Dan Kegel dank at kegel.com
Thu Oct 13 13:14:18 CDT 2011

Andrew wrote:
"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...
Name: winealsa-placate-opaque.patch
Type: text/x-patch
Size: 1259 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20111013/4b69a5f6/attachment.bin>

More information about the wine-patches mailing list