locks: fix leak on merging leases
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 3 Nov 2010 20:49:44 +0000 (16:49 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 10 Nov 2010 19:31:23 +0000 (14:31 -0500)
commit3df057ac9afe83c4af84016df3baf3a0eb1d3d33
treeae1d30a596abef618d2913cbead649253fa7acfc
parent21b75b019983dfa5c2dda588f4b60b4ca69844a4
locks: fix leak on merging leases

We must also free the passed-in lease in the case it wasn't used because
an existing lease was upgrade/downgraded or already existed.

Note the nfsd caller doesn't care because it's fl_change callback
returns an error in those cases.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/locks.c