speechd-discuss
[Top][All Lists]
Advanced

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

patches to avoid memory leaks in sd_ibmtts


From: jose vilmar estacio de souza
Subject: patches to avoid memory leaks in sd_ibmtts
Date: Mon, 01 Mar 2010 11:32:48 -0300

Hi,
On 02/28/2010 11:59 PM, Chris Brannon wrote:
> Jose Vilmar Estacio de Souza wrote:
>    
> I haven't looked at all of your code; I will tomorrow.
>    
Thanks.
> You can get rid of the info variable from module_init
> and module_audio_init_spd.  It isn't used for anything.
> In module_init from ibmtts.c, here are the only two places where info is used:
> Declared at line 406,
> and set to g_string_new("") at line 414.
> You should be able to just delete both of those.
> In module_audio_init_spd, here are the places where info is used:
> declared at line 1119,
> set to g_string_new("") at line 1124,
> used as the first argument to g_string_append_printf at line 1197.
> Again, you should be able to just delete all three of occurrences.
>
>    
the problem is that info is used in a macro called ABORT and the macro 
is used in the function. Deleting the declaration will generate an error 
in the macro invocation.

> Line 1197 of module_utils.c is interesting.  That is an error message,
> and my first thought is that it needs to be propagated to the caller,
> via the status_info argument.
> However, abort is called, so it really doesn't matter.
>
>    
Abort is a  macro with one parameter, defined in the program.
The macro places the value of the parameter in the variable info, 
transfers the value of the variable info to the  variable status_info 
and returns -1.
> -- Chris
>
> _______________________________________________
> Speechd mailing list
> Speechd at lists.freebsoft.org
> http://lists.freebsoft.org/mailman/listinfo/speechd
>    



reply via email to

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