[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1283925324.2634.843.camel@edumazet-laptop>
Date: Wed, 08 Sep 2010 07:55:24 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: jovi zhang <bookjovi@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Johannes Berg <johannes.berg@...el.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Alexey Dobriyan <adobriyan@...nvz.org>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] netlink: Fix kfree NULL pointer
Le mercredi 08 septembre 2010 à 13:33 +0800, jovi zhang a écrit :
> YES, maybe kfree(NULL) is legal, but I cannot see there have any need
> to invoke kfree(NULL) in this function.
> Also I check kfree usage in other code, I havn't find any kfree(NULL) usage.
We have hundred call sites doing kfree(NULL), if it makes code shorter.
Its usually code path handling exceptions (errors if you prefer), and we
prefer to use ugly gotos, and even kfree(NULL), to make it as short as
possible.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists