# Re: \[PATCH\] skbuff: remove pointless conditional before kfree\_skb()

- From: Eric Dumazet \<hidden\>
- Date: 2012-08-29 03:38:50 
- List: netdev
- Page: https://ratatoskr.run/netdev/2012/08/10902841
- Thread: https://ratatoskr.run/netdev/2012/08/10902789/t.md

```text
On Tue, 2012-08-28 at 17:39 -0300, Flavio Leitner wrote:

> Ok, and what if kfree_skb() becomes a macro that first checks
> if the skb is NULL and if not, call the _kfree_skb() to
> continue as before?
> 
> #define kfree_skb(skb)		\
>         if (skb)		\
> 		_kfree_skb(skb)	\

Then its adding a conditional test on each call site and increase
kernel code size.

So if you plan submitting such patch, please keep the whole thing out of
line.
```
