From 70a658a2ba208e4d2ea14a64f86d13f8ca75e6e5 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 13 Aug 2021 03:40:40 +0200 Subject: [PATCH] adjust talloc context there is no obvious reason why the endpoints that belong to a trunk would have the (global) config as parent context, you can't really have endpoints without a trunk anyway. Change-Id: Id3d5fefc12b7d442c09c507b3a8b0231e46e3068 --- src/libosmo-mgcp/mgcp_trunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libosmo-mgcp/mgcp_trunk.c b/src/libosmo-mgcp/mgcp_trunk.c index c69c24211..69750f85b 100644 --- a/src/libosmo-mgcp/mgcp_trunk.c +++ b/src/libosmo-mgcp/mgcp_trunk.c @@ -123,7 +123,7 @@ int mgcp_trunk_alloc_endpts(struct mgcp_trunk *trunk) OSMO_ASSERT(number_endpoints < 65534); /* allocate pointer array for the endpoints */ - trunk->endpoints = talloc_zero_array(trunk->cfg, struct mgcp_endpoint*, + trunk->endpoints = talloc_zero_array(trunk, struct mgcp_endpoint*, number_endpoints); if (!trunk->endpoints) return -1;