lkml.org 
[lkml]   [2009]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH]:Return proper error value on failure of dentry_open
On 06/01/2009 08:11 AM, vibi sreenivasan wrote:
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -201,10 +201,10 @@ int ima_path_check(struct path *path, int mask)
> }
> out:
> mutex_unlock(&iint->mutex);
> - if (file)
> + if (IS_ERR(file))
> fput(file);

This makes no sense at all. If it is IS_ERR, i.e. some negative value,
you don't want to pass it to fput. 'if (file)' was perfectly correct.


\
 
 \ /
  Last update: 2009-06-01 09:43    [W:0.069 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site