lkml.org 
[lkml]   [2013]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] driver-core: only call kfree() if memory was allocated
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.

Sorry, but I'm not going to take this patch, it's not needed.

thanks,

greg k-h


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