[OpenSER-Devel] Memory leak in get_route_set

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Dec 10 09:31:33 UTC 2007


Hi Tiberius,

Thanks for the report - I will take a look on this asap.

Regards,
Bogdan

Tiberius Duluman wrote:
>
> I’ve noticed a memory in leak in shared memory when a dlg_t is
>
> updated using dlg_response_uac from a response that contains
>
> a Record-Route header with more than one route.
>
> N address=0xb5f5fb7c frag=0xb5f5fb64 size=76 used=1
>
> alloc'd from parser/parse_rr.c: do_duplicate_rr(280)
>
> start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
>
> After investigating, I have found that get_route_set is iterating through
>
> each Record-Route header, and for each rr_t element in a Record-Route,
>
> it calls the shm_duplicate_rr ( that calls do_duplicate_rr )
>
> The comment of do_duplicate_rr claims that it duplicates only a single 
> rr_t
>
> structure, but if you look on the code, you will easily note that the 
> entire
>
> linked list starting with passed rr_t is duplicated. Also, a comment in
>
> the beginning of the file claims that:
>
>
> 2003-10-21 duplicate_rr() duplicate the whole linked list of RR
>
> How does this problem can be solved? Should do_duplicate_rr function
>
> duplicate only a single rr_t?
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Devel mailing list
> Devel at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/devel
>   




More information about the Devel mailing list