Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41609
b: refs/heads/master
c: b68dbca
h: refs/heads/master
i:
  41607: eec403f
v: v3
  • Loading branch information
Vlad Yasevich authored and David S. Miller committed Dec 3, 2006
1 parent 8270773 commit 6a997d5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ec75fe85c58471db958386c1604e5006a2e2f69
refs/heads/master: b68dbcab1dc70938fa5516d0ee82c0bf94e9a768
2 changes: 1 addition & 1 deletion trunk/include/net/sctp/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ struct sctp_endpoint {
* this here so we pre-allocate this once and can re-use
* on every receive.
*/
__u8 digest[SCTP_SIGNATURE_SIZE];
__u8 *digest;

/* sendbuf acct. policy. */
__u32 sndbuf_policy;
Expand Down
7 changes: 7 additions & 0 deletions trunk/net/sctp/endpointola.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
{
memset(ep, 0, sizeof(struct sctp_endpoint));

ep->digest = kzalloc(SCTP_SIGNATURE_SIZE, gfp);
if (!ep->digest)
return NULL;

/* Initialize the base structure. */
/* What type of endpoint are we? */
ep->base.type = SCTP_EP_TYPE_SOCKET;
Expand Down Expand Up @@ -182,6 +186,9 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep)
/* Free up the HMAC transform. */
crypto_free_hash(sctp_sk(ep->base.sk)->hmac);

/* Free the digest buffer */
kfree(ep->digest);

/* Cleanup. */
sctp_inq_free(&ep->base.inqueue);
sctp_bind_addr_free(&ep->base.bind_addr);
Expand Down

0 comments on commit 6a997d5

Please sign in to comment.