aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r--net/dccp/ipv6.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index ae2184039fe3..69d8f13895ba 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -157,7 +157,7 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
157 req = inet6_csk_search_req(sk, dh->dccph_dport, 157 req = inet6_csk_search_req(sk, dh->dccph_dport,
158 &hdr->daddr, &hdr->saddr, 158 &hdr->daddr, &hdr->saddr,
159 inet6_iif(skb)); 159 inet6_iif(skb));
160 if (req == NULL) 160 if (!req)
161 goto out; 161 goto out;
162 162
163 /* 163 /*
@@ -169,10 +169,12 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
169 if (!between48(seq, dccp_rsk(req)->dreq_iss, 169 if (!between48(seq, dccp_rsk(req)->dreq_iss,
170 dccp_rsk(req)->dreq_gss)) { 170 dccp_rsk(req)->dreq_gss)) {
171 NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS); 171 NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS);
172 reqsk_put(req);
172 goto out; 173 goto out;
173 } 174 }
174 175
175 inet_csk_reqsk_queue_drop(sk, req); 176 inet_csk_reqsk_queue_drop(sk, req);
177 reqsk_put(req);
176 goto out; 178 goto out;
177 179
178 case DCCP_REQUESTING: 180 case DCCP_REQUESTING:
@@ -322,9 +324,11 @@ static struct sock *dccp_v6_hnd_req(struct sock *sk,struct sk_buff *skb)
322 324
323 req = inet6_csk_search_req(sk, dh->dccph_sport, &iph->saddr, 325 req = inet6_csk_search_req(sk, dh->dccph_sport, &iph->saddr,
324 &iph->daddr, inet6_iif(skb)); 326 &iph->daddr, inet6_iif(skb));
325 if (req != NULL) 327 if (req) {
326 return dccp_check_req(sk, skb, req); 328 nsk = dccp_check_req(sk, skb, req);
327 329 reqsk_put(req);
330 return nsk;
331 }
328 nsk = __inet6_lookup_established(sock_net(sk), &dccp_hashinfo, 332 nsk = __inet6_lookup_established(sock_net(sk), &dccp_hashinfo,
329 &iph->saddr, dh->dccph_sport, 333 &iph->saddr, dh->dccph_sport,
330 &iph->daddr, ntohs(dh->dccph_dport), 334 &iph->daddr, ntohs(dh->dccph_dport),