aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-08 12:41:34 -0500
committerDavid S. Miller <davem@davemloft.net>2005-11-08 12:41:34 -0500
commita51482bde22f99c63fbbb57d5d46cc666384e379 (patch)
tree5482ed1c0803edb2ffbd51035de921fb0f72d82b /net/ipv6/ip6_output.c
parentac7c98eca88a854755475fcfe1b2bf5f97f90d99 (diff)
[NET]: kfree cleanup
From: Jesper Juhl <jesper.juhl@gmail.com> This is the net/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in net/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Acked-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c15
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
1187out: 1186out:
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;