]> git.baikalelectronics.ru Git - kernel.git/commit
skbuff: fix error handling in pskb_copy()
authorDan Carpenter <error27@gmail.com>
Tue, 19 Jul 2011 22:51:49 +0000 (22:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Jul 2011 21:47:54 +0000 (14:47 -0700)
commitd81755319ffc8f95190c5d7ac7bb709412a7ad4e
tree28ced3b034d24f45024bf09e2dcfedd932684c81
parent9e31209a2df545d4b6cea6e8584f40c185c4cbe3
skbuff: fix error handling in pskb_copy()

There are two problems:
1) "n" was allocated with alloc_skb() so we should free it with
   kfree_skb() instead of regular kfree().
2) We return the freed pointer instead of NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c