diff options
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 614296a920c6..dbd9767b32e4 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -587,8 +587,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
587 | skb->next = NULL; | 587 | skb->next = NULL; |
588 | } | 588 | } |
589 | 589 | ||
590 | if (tmp_hdr) | 590 | kfree(tmp_hdr); |
591 | kfree(tmp_hdr); | ||
592 | 591 | ||
593 | if (err == 0) { | 592 | if (err == 0) { |
594 | IP6_INC_STATS(IPSTATS_MIB_FRAGOKS); | 593 | IP6_INC_STATS(IPSTATS_MIB_FRAGOKS); |
@@ -1186,10 +1185,8 @@ int ip6_push_pending_frames(struct sock *sk) | |||
1186 | 1185 | ||
1187 | out: | 1186 | out: |
1188 | inet->cork.flags &= ~IPCORK_OPT; | 1187 | inet->cork.flags &= ~IPCORK_OPT; |
1189 | if (np->cork.opt) { | 1188 | kfree(np->cork.opt); |
1190 | kfree(np->cork.opt); | 1189 | np->cork.opt = NULL; |
1191 | np->cork.opt = NULL; | ||
1192 | } | ||
1193 | if (np->cork.rt) { | 1190 | if (np->cork.rt) { |
1194 | dst_release(&np->cork.rt->u.dst); | 1191 | dst_release(&np->cork.rt->u.dst); |
1195 | np->cork.rt = NULL; | 1192 | np->cork.rt = NULL; |
@@ -1214,10 +1211,8 @@ void ip6_flush_pending_frames(struct sock *sk) | |||
1214 | 1211 | ||
1215 | inet->cork.flags &= ~IPCORK_OPT; | 1212 | inet->cork.flags &= ~IPCORK_OPT; |
1216 | 1213 | ||
1217 | if (np->cork.opt) { | 1214 | kfree(np->cork.opt); |
1218 | kfree(np->cork.opt); | 1215 | np->cork.opt = NULL; |
1219 | np->cork.opt = NULL; | ||
1220 | } | ||
1221 | if (np->cork.rt) { | 1216 | if (np->cork.rt) { |
1222 | dst_release(&np->cork.rt->u.dst); | 1217 | dst_release(&np->cork.rt->u.dst); |
1223 | np->cork.rt = NULL; | 1218 | np->cork.rt = NULL; |