Skip to content
Commit cfddf9f4 authored by Wenwen Wang's avatar Wenwen Wang Committed by Jeff Layton
Browse files

locks: fix a memory leak bug in __break_lease()



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: default avatarWenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
parent df2474a2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment