[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>
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Christopher Brannon, 2010/09/13
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Andrei Kholodnyi, 2010/09/15
- [PATCH] Rework the do_list_voices function, and fix a memory leak.,
Christopher Brannon <=
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Andrei Kholodnyi, 2010/09/16
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Trevor Saunders, 2010/09/16
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Andrei Kholodnyi, 2010/09/17
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Trevor Saunders, 2010/09/17
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Christopher Brannon, 2010/09/16
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Andrei . Kholodnyi, 2010/09/16
- [PATCH] Rework the do_list_voices function, and fix a memory leak., William Hubbs, 2010/09/16
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Christopher Brannon, 2010/09/16
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Andrei Kholodnyi, 2010/09/16
- [PATCH] Rework the do_list_voices function, and fix a memory leak., Christopher Brannon, 2010/09/16