Change in osmo-mgw[master]: WIP: attempt to fix memleak

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

laforge gerrit-no-reply at lists.osmocom.org
Wed Jul 15 09:02:26 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/19271 )


Change subject: WIP: attempt to fix memleak
......................................................................

WIP: attempt to fix memleak

FIXME

Change-Id: I83938ff47fa8570b8d9dc810a184864a0c0b58aa
---
M src/libosmo-mgcp-client/mgcp_client_fsm.c
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/71/19271/1

diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c
index e38a4ba..b015ec3 100644
--- a/src/libosmo-mgcp-client/mgcp_client_fsm.c
+++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c
@@ -527,8 +527,12 @@
 		msg = make_dlcx_msg(mgcp_ctx);
 		if (!msg)
 			LOGPFSML(fi, LOGL_ERROR, "MGW/DLCX: Error composing DLCX message\n");
-		else
+		else {
+			mgcp_trans_id_t trans_id = mgcp_msg_trans_id(msg);
 			mgcp_client_tx(mgcp, msg, NULL, NULL);
+			/* immediately remove the 'response_pending' entry */
+			mgcp_client_cancel(mgcp, trans_id);
+		}
 	}
 
 	talloc_free(mgcp_ctx);

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I83938ff47fa8570b8d9dc810a184864a0c0b58aa
Gerrit-Change-Number: 19271
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200715/d375c76b/attachment.htm>


More information about the gerrit-log mailing list