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

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


Hi,

Andrew Eikum updated ALSA's documentation http://git.alsa-project.org/?p=alsa-lib.git;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.

Regards,
	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: <http://www.winehq.org/pipermail/wine-patches/attachments/20120130/2ac66138/attachment.obj>


More information about the wine-patches mailing list