-/* Create a sctp_endpoint with all that boring stuff initialized.
- * Returns NULL if there isn't enough memory.
- */
-struct sctp_endpoint *sctp_endpoint_new(struct sock *sk, int gfp)
-{
- struct sctp_endpoint *ep;
-
- /* Build a local endpoint. */
- ep = t_new(struct sctp_endpoint, gfp);
- if (!ep)
- goto fail;
- if (!sctp_endpoint_init(ep, sk, gfp))
- goto fail_init;
- ep->base.malloced = 1;
- SCTP_DBG_OBJCNT_INC(ep);
- return ep;
-
-fail_init:
- kfree(ep);
-fail:
- return NULL;
-}
-