[OpenSER-Devel] memory leak in canceled call with diversion header
William Quan
wiquan at employees.org
Wed Feb 6 01:55:25 UTC 2008
I think my issue is with ACC log_extra setting:
modparam("acc", "log_extra", "div=$di")
The acc callback 'on_missed' is invoked when the call is canceled (487).
With this 'log_extra' setting, the acc function extra2strar() executes
and parses the diversion header in the request. It is this memory that
is not freed (msg->diversion->parsed).
Is function free_cell() supposed to clean this up with the rest of the txn?
--will
Juha Heinanen wrote:
> William Quan writes:
>
> > Looking for advice on a memory problem in openser v1.2.3.
> > A simple call is canceled, but the memory associated with the
> > 'msg->diversion->parsed' is leaking (Invite contains a 'Diversion' header).
> > Processing the 487 appears to be running tm callbacks that parse the
> > message (while allocating memory), which do not later get freed.
>
> will,
>
> i didn't try to interpret your memory debug, but took a look at
> diversion header parsing code. like many other header parsers, it is
> using parse_to() function and there is in hf.c/clean_hdr_field()
> function case
>
> case HDR_DIVERSION_T:
> free_to(hf->parsed);
> break;
>
> so i didn't find anything specific to diversion header parsing that
> could explain a leak. it doesn't mean that there couldn't be a problem
> somewhere else.
>
> -- juha
>
More information about the Devel
mailing list