From 226a34ac09e5d9c08ab8845e4c2e3fbd7b64010b Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Thu, 19 Jan 2012 12:38:58 +0100 Subject: [PATCH] Document strdup allocation in snd_card_get_name family MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This was spotted by Jörg Höhle on the wine-patches ML. Signed-off-by: Andrew Eikum Signed-off-by: Takashi Iwai --- src/control/cards.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/control/cards.c b/src/control/cards.c index 0bb8f861..b528e33a 100644 --- a/src/control/cards.c +++ b/src/control/cards.c @@ -166,6 +166,9 @@ int snd_card_get_index(const char *string) * \param card Card number * \param name Result - card name corresponding to card number * \result zero if success, otherwise a negative error code + * + * The value returned in name is allocated with strdup and should be + * freed when no longer used. */ int snd_card_get_name(int card, char **name) { @@ -193,6 +196,9 @@ int snd_card_get_name(int card, char **name) * \param card Card number * \param name Result - card long name corresponding to card number * \result zero if success, otherwise a negative error code + * + * The value returned in name is allocated with strdup and should be + * freed when no longer used. */ int snd_card_get_longname(int card, char **name) { -- 2.47.1