[lkml]   [2013]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] driver-core: only call kfree() if memory was allocated
On Sat, Aug 03, 2013 at 06:04:45AM +0800, Greg KH wrote:
> On Fri, Aug 02, 2013 at 11:43:50PM +0200, Andreas Platschek wrote:
> > There are several cases where we could bail out of show_uevent()
> > before kzalloc() is even called. In those cases we don't want to
> > call kfree().
> Why not? It's totally safe to do that.
> > In addition the error handling of kzalloc() is now using the
> > single point of exit as well.
> We had the single point of exit to start with, there's no change made
> there.

Oops, no, you are correct about that one, but it's not really a big deal
for such a small function.

greg k-h

 \ /
  Last update: 2013-08-03 11:41    [W:0.032 / U:6.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site