lkml.org 
[lkml]   [2009]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Possible memory leak in fs/sysfs/bin.c
Date
Hi

Catalin Marinas <catalin.marinas <at> arm.com> writes:


> --- a/fs/sysfs/bin.c
> +++ b/fs/sysfs/bin.c
> @@ -164,6 +164,7 @@ static ssize_t write(struct file *file, const char
> __user *userbuf,
> mutex_lock(&bb->mutex);
>
> memcpy(bb->buffer, temp, count);
> + kfree(temp);

Does the kfree() need to be inside the mutex_lock? Otherwise looks OK to me.

Parag






\
 
 \ /
  Last update: 2009-07-07 01:15    [W:0.038 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site