diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /net/sctp/endpointola.c | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/sctp/endpointola.c')
-rw-r--r-- | net/sctp/endpointola.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index a2b553721514..129756908da4 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; |
@@ -181,6 +185,9 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep) | |||
181 | /* Free up the HMAC transform. */ | 185 | /* Free up the HMAC transform. */ |
182 | crypto_free_hash(sctp_sk(ep->base.sk)->hmac); | 186 | crypto_free_hash(sctp_sk(ep->base.sk)->hmac); |
183 | 187 | ||
188 | /* Free the digest buffer */ | ||
189 | kfree(ep->digest); | ||
190 | |||
184 | /* Cleanup. */ | 191 | /* Cleanup. */ |
185 | sctp_inq_free(&ep->base.inqueue); | 192 | sctp_inq_free(&ep->base.inqueue); |
186 | sctp_bind_addr_free(&ep->base.bind_addr); | 193 | sctp_bind_addr_free(&ep->base.bind_addr); |
@@ -222,7 +229,7 @@ struct sctp_endpoint *sctp_endpoint_is_match(struct sctp_endpoint *ep, | |||
222 | struct sctp_endpoint *retval; | 229 | struct sctp_endpoint *retval; |
223 | 230 | ||
224 | sctp_read_lock(&ep->base.addr_lock); | 231 | sctp_read_lock(&ep->base.addr_lock); |
225 | if (ep->base.bind_addr.port == laddr->v4.sin_port) { | 232 | if (htons(ep->base.bind_addr.port) == laddr->v4.sin_port) { |
226 | if (sctp_bind_addr_match(&ep->base.bind_addr, laddr, | 233 | if (sctp_bind_addr_match(&ep->base.bind_addr, laddr, |
227 | sctp_sk(ep->base.sk))) { | 234 | sctp_sk(ep->base.sk))) { |
228 | retval = ep; | 235 | retval = ep; |
@@ -250,7 +257,7 @@ static struct sctp_association *__sctp_endpoint_lookup_assoc( | |||
250 | struct sctp_association *asoc; | 257 | struct sctp_association *asoc; |
251 | struct list_head *pos; | 258 | struct list_head *pos; |
252 | 259 | ||
253 | rport = paddr->v4.sin_port; | 260 | rport = ntohs(paddr->v4.sin_port); |
254 | 261 | ||
255 | list_for_each(pos, &ep->asocs) { | 262 | list_for_each(pos, &ep->asocs) { |
256 | asoc = list_entry(pos, struct sctp_association, asocs); | 263 | asoc = list_entry(pos, struct sctp_association, asocs); |