From 866ba4a77e3b0c4759877c523740107ec0637dc3 Mon Sep 17 00:00:00 2001 From: tuexen Date: Mon, 20 Aug 2012 17:36:10 +0000 Subject: [PATCH] MFC r239052: Fix a refcount issue. The caller only decrements if stcb is NULL. Approved by: re (kib) git-svn-id: svn://svn.freebsd.org/base/releng/9.1@239452 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/netinet/sctp_pcb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index f78e9242..7228b910 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2417,10 +2417,9 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int offset, if (zero_address) { stcb = sctp_findassoc_by_vtag(NULL, to, 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, -- 2.42.0