mgcp_client_init(): consider "talloc returns NULL" case

Change-Id: I131019b3c04a7860a118991c8f3bb31185fb11e4
This commit is contained in:
Harald Welte
2020-07-15 10:56:45 +02:00
parent 6521fc0695
commit efe1571b7b

View File

@@ -735,6 +735,8 @@ struct mgcp_client *mgcp_client_init(void *ctx,
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);