Change in osmo-mgw[master]: mgcp_ratectr: do not set talloc destructor on library allocated item

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/.

daniel gerrit-no-reply at lists.osmocom.org
Wed Aug 4 09:20:13 UTC 2021


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

Change subject: mgcp_ratectr: do not set talloc destructor on library allocated item
......................................................................


Patch Set 5:

(2 comments)

https://gerrit.osmocom.org/c/osmo-mgw/+/25103/5/src/libosmo-mgcp/mgcp_protocol.c 
File src/libosmo-mgcp/mgcp_protocol.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/25103/5/src/libosmo-mgcp/mgcp_protocol.c@1656 
PS5, Line 1656: 	talloc_free(cfg);
I don't think this is needed, see https://talloc.samba.org/talloc/doc/html/group__talloc.html#ga79d9cfea777a3d63167be7aa05463309

"If your destructor attempts to talloc_free() the pointer that it is the destructor for then talloc_free() will return -1 and the free will be ignored. This would be a pointless operation anyway, as the destructor is only called when the memory is just about to go away."


https://gerrit.osmocom.org/c/osmo-mgw/+/25103/5/src/libosmo-mgcp/mgcp_trunk.c 
File src/libosmo-mgcp/mgcp_trunk.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/25103/5/src/libosmo-mgcp/mgcp_trunk.c@45 
PS5, Line 45: 	talloc_free(trunk);
Same



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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ifc5091e9f95cc721e58d1eb2e55b97102c497706
Gerrit-Change-Number: 25103
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Wed, 04 Aug 2021 09:20:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210804/55ffb7ac/attachment.htm>


More information about the gerrit-log mailing list