[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6591e0fcb089f_21410c2946c@willemb.c.googlers.com.notmuch>
Date: Sun, 31 Dec 2023 16:45:32 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Markus Elfring <Markus.Elfring@....de>, 
 netdev@...r.kernel.org, 
 kernel-janitors@...r.kernel.org, 
 "David S. Miller" <davem@...emloft.net>, 
 Eric Dumazet <edumazet@...gle.com>, 
 Jakub Kicinski <kuba@...nel.org>, 
 Paolo Abeni <pabeni@...hat.com>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] packet: Improve exception handling in fanout_add()
Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sun, 31 Dec 2023 16:30:51 +0100
> 
> The kfree() function was called in some cases by the fanout_add() function
> even if the passed variable contained a null pointer.
> This issue was detected by using the Coccinelle software.
It is fine to call kfree with a possible NULL pointer:
	/**
	 * kfree - free previously allocated memory
	 * @object: pointer returned by kmalloc() or kmem_cache_alloc()
	 *
	 * If @object is NULL, no operation is performed.
	 */
	void kfree(const void *object)
Powered by blists - more mailing lists
 
