Re: [PATCH 01/14] Big kfree NULL check cleanup - net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jesper,

> This is the net/ part of the big kfree cleanup patch.
> 
> Remove pointless checks for NULL prior to calling kfree() in net/.
> 
> 
> Sorry about the long Cc: list, but I wanted to make sure I included everyone
> who's code I've changed with this patch.

you forgot me ;)

> --- linux-2.6.14-rc4-orig/net/bluetooth/hidp/core.c	2005-08-29 01:41:01.000000000 +0200
> +++ linux-2.6.14-rc4/net/bluetooth/hidp/core.c	2005-10-13 11:47:49.000000000 +0200
> @@ -657,9 +657,7 @@ unlink:
>  failed:
>  	up_write(&hidp_session_sem);
>  
> -	if (session->input)
> -		kfree(session->input);
> -
> +	kfree(session->input);
>  	kfree(session);
>  	return err;
>  }

Signed-off-by: Marcel Holtmann <[email protected]>

Regards

Marcel


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux