diff options
Diffstat (limited to 'net/sctp/endpointola.c')
-rw-r--r-- | net/sctp/endpointola.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index 9b6b394b66f6..090f2b2a0cab 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c | |||
@@ -72,6 +72,10 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, | |||
72 | { | 72 | { |
73 | memset(ep, 0, sizeof(struct sctp_endpoint)); | 73 | memset(ep, 0, sizeof(struct sctp_endpoint)); |
74 | 74 | ||
75 | ep->digest = kzalloc(SCTP_SIGNATURE_SIZE, gfp); | ||
76 | if (!ep->digest) | ||
77 | return NULL; | ||
78 | |||
75 | /* Initialize the base structure. */ | 79 | /* Initialize the base structure. */ |
76 | /* What type of endpoint are we? */ | 80 | /* What type of endpoint are we? */ |
77 | ep->base.type = SCTP_EP_TYPE_SOCKET; | 81 | ep->base.type = SCTP_EP_TYPE_SOCKET; |
@@ -182,6 +186,9 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep) | |||
182 | /* Free up the HMAC transform. */ | 186 | /* Free up the HMAC transform. */ |
183 | crypto_free_hash(sctp_sk(ep->base.sk)->hmac); | 187 | crypto_free_hash(sctp_sk(ep->base.sk)->hmac); |
184 | 188 | ||
189 | /* Free the digest buffer */ | ||
190 | kfree(ep->digest); | ||
191 | |||
185 | /* Cleanup. */ | 192 | /* Cleanup. */ |
186 | sctp_inq_free(&ep->base.inqueue); | 193 | sctp_inq_free(&ep->base.inqueue); |
187 | sctp_bind_addr_free(&ep->base.bind_addr); | 194 | sctp_bind_addr_free(&ep->base.bind_addr); |