[Home]

Summary:ASTERISK-08081: improper freing of memory in chan_sip.c::unload_module() ?
Reporter:Luigi Rizzo (rizzo)Labels:
Date Opened:2006-11-07 13:04:27.000-0600Date Closed:2006-11-14 10:45:33.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:i doubt that this code is ever exercised in practice, but i notice
that chan_sip.c::unload_module() in the final part where tries to
get rid of the dialoglist, does not call __sip_destroy() nor does
many of the things that are done there.
Unless we know better, i think it would be good to just call __sip_destroy()
there on each descriptor (of course, after applying the change in
team/rizzo/astobj2/ to separate the object destruction from the list
unlinking).

****** ADDITIONAL INFORMATION ******

probably applies to older branches as well, but not worthwhile doing
it other than for trunk and 1.4
Comments:By: Olle Johansson (oej) 2006-11-07 15:57:59.000-0600

Patch?

By: Luigi Rizzo (rizzo) 2006-11-07 16:37:15.000-0600

this as a prerequisite
http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?r1=47272&r2=47273

and this is the actual patch
http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?r1=47277&r2=47296

By: Olle Johansson (oej) 2006-11-08 03:40:43.000-0600

Resolved in 1.4 and trunk. Thanks.

THe code will be executed in the few cases where you unload chan_sip while upgrading a running system. Unload a module, replace it with a new, then load it again without having to restart Asterisk. We don't want to have memory allocated at that point.

By: Serge Vecher (serge-v) 2006-11-14 10:45:33.000-0600

And the scroll-keeper adds:

"Fixed in:
1.2    r47308
1.4    r47309
trunk  r47313
"