]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Add a paranoia check for leases
authorVolker Lendecke <vl@samba.org>
Thu, 13 Sep 2018 16:56:54 +0000 (18:56 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 14 Sep 2018 05:49:13 +0000 (07:49 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/oplock.c

index 2faad788d464cc897b40696e3ddb3e69af68ea46..827dbeb4ef22a9341326ce399e7ffa5338986486 100644 (file)
@@ -347,6 +347,12 @@ static void lease_timeout_handler(struct tevent_context *ctx,
                return;
        }
 
+       /*
+        * Paranoia check: There can only be one fsp_lease per lease
+        * key
+        */
+       SMB_ASSERT(fsp->lease == lease);
+
        lck = get_existing_share_mode_lock(
                        talloc_tos(), fsp->file_id);
        if (lck == NULL) {