neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/15132 )

Change subject: mgcp_codec: split codec_free() off of codec_init()
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/15132/2/src/libosmo-mgcp/mgcp_codec.c
File src/libosmo-mgcp/mgcp_codec.c:

https://gerrit.osmocom.org/#/c/15132/2/src/libosmo-mgcp/mgcp_codec.c@252
PS2, Line 252:  conn->end.codecs_assigned++;
> Is the some scenario where we shrink the list and this counter is decreased? 
> It's only set to 0 upon […]
There would be a theoretical scenario where codec negotiation ends up changing 
/ decreasing the set of permitted codecs.

In code there should be a place that completely clears the codecs somewhere, 
IIRC when it starts parsing the SDP, which might come in any number of times 
(MDCX) on a given conn.
It is cleared also when the conn gets deallocated (DLCX).

This is preparation to fix a memory leak that keeps cleared entries in memory 
until the conn gets deallocated.

So any number of MDCXes might clear the list and read new entries, and the 
talloc ctx being the conn still keeps the audio names of the cleared entries 
until the conn gets DLCXed)



--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15132
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I120cab0a352a1e7b31c8f9c720c47b2c291311d7
Gerrit-Change-Number: 15132
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofm...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@gnumonks.org>
Gerrit-Reviewer: neels <nhofm...@sysmocom.de>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-Comment-Date: Tue, 13 Aug 2019 22:18:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pes...@sysmocom.de>
Gerrit-MessageType: comment

Reply via email to