mgcp_test: release endpoints after use

The test function test_multilple_codec() in mgcp_test.c creates a
lot of connections, but it never releases them. Just freeing the
cfg object is not enough since the UDP ports stay open and this
may interfere with other tests that also create connections
(port numbers).

- Make sure all endpoints are released when test_multilple_codec()
  is done.

Change-Id: Ic13b4368162149ec36c93f4188fa4c71166e08d5
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index df6ea2f..ea79485 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -1265,6 +1265,7 @@
 	struct in_addr addr;
 	struct mgcp_conn_rtp *conn = NULL;
 	char conn_id[256];
+	int i;
 
 	printf("Testing multiple payload types\n");
 
@@ -1398,6 +1399,9 @@
 	OSMO_ASSERT(conn);
 	OSMO_ASSERT(conn->end.codec->payload_type == 0);
 
+	for (i = 1; i < cfg->trunk.number_endpoints; i++)
+		mgcp_endp_release(&cfg->trunk.endpoints[i]);
+
 	talloc_free(cfg);
 }