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/gerrit-log@lists.osmocom.org/.
neels gerrit-no-reply at lists.osmocom.orgneels 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 1:
(2 comments)
https://gerrit.osmocom.org/#/c/15132/1/src/libosmo-mgcp/mgcp_codec.c
File src/libosmo-mgcp/mgcp_codec.c:
https://gerrit.osmocom.org/#/c/15132/1/src/libosmo-mgcp/mgcp_codec.c@117
PS1, Line 117: codec_init(codec);
> So in here you are not longer freeing codec->subtype_name and codec->audio_name. […]
Yes: codec_set() is only used by codec_add(), and invariably it uses an *unpopulated* array entry.
So there could be random data in that entry and we must not free those pointers.
Instead it is important to free the memory when removing a codec entry, i.e. before it becomes an unpopulated array entry.
For clarity this function should probably go inside codec_add()...
yes I'll do that quickly.
https://gerrit.osmocom.org/#/c/15132/1/src/libosmo-mgcp/mgcp_codec.c@239
PS1, Line 239: memset(codec, 0, sizeof(*codec));
> You can either drop this memset or line 96: "*codec = (struct mgcp_rtp_codec){};"
nice, thx
--
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: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Mon, 12 Aug 2019 22:35:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190812/31bc3616/attachment.htm>