s4: torture: Ensure we close the handle on the correct tree-id.
authorJeremy Allison <jra@samba.org>
Fri, 31 Aug 2018 22:44:16 +0000 (15:44 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 4 Sep 2018 03:23:57 +0000 (05:23 +0200)
Otherwise we leave a directory behind on exit.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Sep  4 05:23:57 CEST 2018 on sn-devel-144

source4/torture/smb2/notify.c

index 02a76c626e371fd14c573d092c433b44ef0ce076..ebb4f8a4f8e951f96f281c620d358102544814ac 100644 (file)
@@ -2559,7 +2559,7 @@ static bool torture_smb2_inotify_rename(struct torture_context *torture,
        ok = true;
 done:
        if (!smb2_util_handle_empty(h1)) {
-               smb2_util_close(tree2, h1);
+               smb2_util_close(tree1, h1);
        }
        if (!smb2_util_handle_empty(h2)) {
                smb2_util_close(tree2, h2);