[asterisk-dev] memory leak in chan_agent.c
russell at digium.com
Wed Mar 7 10:56:23 MST 2007
> i was just reading chan_agent.c (svn 1.4 head) and found that in
> "add_agent" (line :299) there is a "parse" variable allocated which
> never seems to be freed. Is that correct or does the app_args_parse
> stuff magically free that later ? I assume this is a memory leak, if
> somebody confirms i'll fix that and check for other mem leaks like that.
parse = ast_strdupa(agent);
Note that this is strdupa, and not strdup. This function just allocates
memory on the stack, so there is no need to free it.
More information about the asterisk-dev