[PATCH] e1: Memory leak/Reference leak on the e1inp_line

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Tue Aug 21 07:20:54 UTC 2012


On Tue, Aug 21, 2012 at 03:10:32AM +0200, Pablo Neira Ayuso wrote:
> Hi Holger,

Hi Pablo,

> IIRC, the refcnt becomes 2 if both the OML and RSL links are up.

hehe, not really sure. The _rsl_cb will will clone the e1inp_line
but I think after we know which BTS is making the connection we
throw away the cloned line and _get_line the OML one.

> With your patch, the refcount becomes zero after the two
> e1inp_sign_link_destroy calls that happen in ->sign_link_down. Thus,
> releasing the line that we were leaking.

Sounds plausible. Luckily you only free the link when it becomes
0 (and not smaller). I am going to add an assertion for >= 0 for
the refcount.

> But let me check this tomorrow again after some sleeping :-).

thanks




More information about the OpenBSC mailing list