Change in ...osmo-mgw[master]: mgcp_codec: split codec_free() off of codec_init()

neels gerrit-no-reply at
Tue Aug 13 22:18:53 UTC 2019

neels has posted comments on this change. ( )

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

Patch Set 2:

(1 comment) 
File src/libosmo-mgcp/mgcp_codec.c: 
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
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I120cab0a352a1e7b31c8f9c720c47b2c291311d7
Gerrit-Change-Number: 15132
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Reviewer: neels <nhofmeyr at>
Gerrit-Reviewer: pespin <pespin at>
Gerrit-Comment-Date: Tue, 13 Aug 2019 22:18:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list