vfs_fruit: Fix a leak of "br_lck"
commit8ef80a001b961309d820a61404d41e23bef9ad1c
authorVolker Lendecke <vl@samba.org>
Mon, 6 Aug 2018 12:33:34 +0000 (6 14:33 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 23 Aug 2018 08:39:31 +0000 (23 10:39 +0200)
tree6721e7cd8c88a05abde4eaa352104d706e0781a2
parenta73d973f0869f2222b92723bf5acf86a9eaf4029
vfs_fruit: Fix a leak of "br_lck"

Fix a panic if fruit_access_check detects a locking conflict.

do_lock() returns a valid br_lck even in case of a locking conflict.
Not free'ing it leads to a invalid lock order panic later, because
"br_lck" corresponds to a dbwrap lock on brlock.tdb.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13584

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 51d57073798f76ec4f1261945e0ba779b2530009)
source3/modules/vfs_fruit.c