speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Rework the do_list_voices function, and fix a memory leak.


From: Christopher Brannon
Subject: [PATCH] Rework the do_list_voices function, and fix a memory leak.
Date: Wed, 15 Sep 2010 21:36:33 -0500

Andrei Kholodnyi <andrei.kholodnyi at gmail.com> writes:

>> ? ? g_string_append_printf(voice_list, "200-%s %s %s\n", voices[i]->name, 
>> lang, dialect);
>
> should you also check
> if (voices[i]->name == NULL)
>    name = "none";
> else
>    name = voices[i]->name;

Hi Andrei,
Possibly, but every voice must have a name.  Otherwise, one cannot
select it.  I'd say that (voices[i]->name == NULL) is an error
condition which should never occur.
On the other hand, dialect is often NULL.  I'm not sure whether language
can be NULL.

I can add a check for (voices[i]->name == NULL), if you like.

-- Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://lists.freebsoft.org/pipermail/speechd/attachments/20100915/26a37b8c/attachment.pgp>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]