Change in osmo-mgw[master]: mgcp_client_init(): consider "talloc returns NULL" case

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:25 UTC 2020


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


Change subject: mgcp_client_init(): consider "talloc returns NULL" case
......................................................................

mgcp_client_init(): consider "talloc returns NULL" case

Change-Id: I131019b3c04a7860a118991c8f3bb31185fb11e4
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index 819461d..eeb5e4f 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -735,6 +735,8 @@
 	struct mgcp_client *mgcp;
 
 	mgcp = talloc_zero(ctx, struct mgcp_client);
+	if (!mgcp)
+		return NULL;
 
 	INIT_LLIST_HEAD(&mgcp->responses_pending);
 	INIT_LLIST_HEAD(&mgcp->inuse_endpoints);

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I131019b3c04a7860a118991c8f3bb31185fb11e4
Gerrit-Change-Number: 19269
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/50a0c2c1/attachment.htm>


More information about the gerrit-log mailing list