Change in osmo-mgw[master]: libosmo-mgcp-client: fix memleak in case if no response is received

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.org
Thu Jun 18 16:08:41 UTC 2020


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

Change subject: libosmo-mgcp-client: fix memleak in case if no response is received
......................................................................


Patch Set 5: Code-Review-1

(2 comments)

This change is ready for review.

https://gerrit.osmocom.org/c/osmo-mgw/+/18881/5/include/osmocom/mgcp_client/mgcp_client_internal.h 
File include/osmocom/mgcp_client/mgcp_client_internal.h:

https://gerrit.osmocom.org/c/osmo-mgw/+/18881/5/include/osmocom/mgcp_client/mgcp_client_internal.h@6 
PS5, Line 6: #define MSGB_CB_MGCP_TRANS_ID	0
(by modifying the ws here it looks like that const is involved in the patch... rather just use a space in both?)


https://gerrit.osmocom.org/c/osmo-mgw/+/18881/5/src/libosmo-mgcp-client/mgcp_client.c 
File src/libosmo-mgcp-client/mgcp_client.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/18881/5/src/libosmo-mgcp-client/mgcp_client.c@1002 
PS5, Line 1002: int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id)
I'm sorry to dampen yet again, but seeing this now seems like the problem is in the caller of this API: it looks like osmo-bsc fails to call mgcp_client_cancel() in some situation, and the timeout or teardown should happen in osmo-bsc?

I'm particularly 'worried' about that comment saying "the FSM likely already terminated, thus we don't call osmo_fsm_inst_term()" -- that sounds like one of those gordian knots of solving proper cleanup across several FSMs, and that this patch is inviting trouble.

I'll have to take a closer look at this before I can say for sure.
Would be good to know if you have more information about how the memleak situation is caused, if you have any, to identify the code path in osmo-bsc that might fail to call mgcp_client_cancel().



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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia2e89f31685a0822e5cb147a06cc1fc68efc1ec4
Gerrit-Change-Number: 18881
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Comment-Date: Thu, 18 Jun 2020 16:08:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200618/b2fbcd3b/attachment.htm>


More information about the gerrit-log mailing list