Subject: Re: The recent free_netdev() conversion...

From: Jeff Garzik <[email-masked]>
Date: Mon, 01 Sep 2003 11:58:47 -0400

David S. Miller wrote:
> On Mon, 01 Sep 2003 10:59:09 -0400
> Jeff Garzik <[email-masked]> wrote:
> 
> 
>>     err_out:
>>	kfree(dev);
> 
>  ...
> 
>>The "kfree" needs to be a free_netdev() too.
> 
> 
> If the 'dev' hasn't been given to register_netdev() it
> really doesn't need to be free_netdev().  It's just memory
> until it has been given to the device layer.

True, but for long term, it's best to use free_netdev().  Besides 
naturally pairing with alloc_foodev(), if we ever decide to have 
alloc_netdev() perform more than one allocation, free_netdev() will 
already be in place to handle the multiple de-allocations.

	Jeff