winealsa: snd_card_get_name uses strdup (Valgrind). (2nd)

Joerg-Cyril.Hoehle at Joerg-Cyril.Hoehle at
Mon Jan 30 12:01:31 CST 2012


Andrew Eikum updated ALSA's documentation;a=commitdiff;h=226a34ac09e5d9c08ab8845e4c2e3fbd7b64010b
Now the requirement to free() is documented.

I've had no feedback about patch #82900, so I looked at it again.
ALSA does not document (nor use) the return code range [1..maxint].
Here's a variation on the patch that'll reuse the same condition
that is used after snd_card_get_name to use a static name: err < 0.

+            if(!(err < 0))
+                free((char*)cardname);

Perhaps that way, the relationship is obvious.

Please choose whether to apply the original patch #82900 or this one.
It used instead "if(!err)" i.e. the 0 return code that ALSA documents.

	Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-winealsa-snd_card_get_name-uses-strdup-Valgrind.patch
Type: application/octet-stream
Size: 1264 bytes
Desc: 0001-winealsa-snd_card_get_name-uses-strdup-Valgrind.patch
URL: <>

More information about the wine-patches mailing list