]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: Move a variable declaration closer to its use
authorVolker Lendecke <vl@samba.org>
Wed, 19 Sep 2018 14:26:09 +0000 (16:26 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 25 Oct 2018 19:44:17 +0000 (21:44 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Oct 25 21:44:17 CEST 2018 on sn-devel-144

source3/smbd/open.c

index 6bfd5ba1371c6cb098654825fcc7cd42731c3ca5..82c640e5e9a3dcda393d3f4e3fca01278709884e 100644 (file)
@@ -4962,13 +4962,13 @@ static NTSTATUS lease_match(connection_struct *conn,
                for (j=0; j<d->num_share_modes; j++) {
                        struct share_mode_entry *e = &d->share_modes[j];
                        uint32_t e_lease_type = get_lease_type(d, e);
-                       struct share_mode_lease *l = NULL;
 
                        if (share_mode_stale_pid(d, j)) {
                                continue;
                        }
 
                        if (e->op_type == LEASE_OPLOCK) {
+                               struct share_mode_lease *l = NULL;
                                l = &lck->data->leases[e->lease_idx];
                                if (!smb2_lease_key_equal(&l->lease_key,
                                                          lease_key)) {