diff options
author | tuexen <tuexen@FreeBSD.org> | 2012-08-05 10:47:18 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2012-08-05 10:47:18 +0000 |
commit | f3596e49d407ab7cf22e8dfe2799c544b293bee7 (patch) | |
tree | 1bf16137279531697951a2551cf2321c6d3b71c4 /sys/netinet | |
parent | 71347eff19f8956ccf764c6cd6c3f76870f530ca (diff) | |
download | FreeBSD-src-f3596e49d407ab7cf22e8dfe2799c544b293bee7.zip FreeBSD-src-f3596e49d407ab7cf22e8dfe2799c544b293bee7.tar.gz |
Fix a refcount issue. The called only decrements is stcb is NULL.
MFC after: 3 days
Discussed with: rrs
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/sctp_pcb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index fcf8b8c..1af9196 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2308,10 +2308,9 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int offset, if (zero_address) { stcb = sctp_findassoc_by_vtag(NULL, dst, ntohl(sh->v_tag), inp_p, netp, sh->src_port, sh->dest_port, 1, vrf_id, 0); - /* - * SCTP_PRINTF("findassociation_ep_asconf: zero lookup - * address finds stcb 0x%x\n", (uint32_t)stcb); - */ + if (stcb != NULL) { + SCTP_INP_DECR_REF(*inp_p); + } } else { stcb = sctp_findassociation_ep_addr(inp_p, (struct sockaddr *)&remote_store, netp, |