Re: [PATCH] locks: fix a memory leak bug

2019-08-20 Thread Jeff Layton
On Mon, 2019-08-19 at 18:47 -0500, Wenwen Wang wrote: > In __break_lease(), the file lock 'new_fl' is allocated in lease_alloc(). > However, it is not deallocated in the following execution if > smp_load_acquire() fails, leading to a memory leak bug. To fix this issue, > free 'new_fl' before

[PATCH] locks: fix a memory leak bug

2019-08-19 Thread Wenwen Wang
In __break_lease(), the file lock 'new_fl' is allocated in lease_alloc(). However, it is not deallocated in the following execution if smp_load_acquire() fails, leading to a memory leak bug. To fix this issue, free 'new_fl' before returning the error. Signed-off-by: Wenwen Wang --- fs/locks.c |