smbd: fix "ea support = no"
authorRalph Boehme <slow@samba.org>
Sat, 11 Sep 2021 10:33:37 +0000 (12:33 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 11 Sep 2021 21:48:01 +0000 (21:48 +0000)
Introduced by de83946311d8c1f007c236751280e9f101cc3a29.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Sep 11 21:48:01 UTC 2021 on sn-devel-184

source3/smbd/trans2.c

index a6bd232f679df505cdf19c110a3ecdaaece454e5..cd6b61429c5447a0947ab11bfab6ca6b4aa1a049 100644 (file)
@@ -658,11 +658,12 @@ static unsigned int estimate_ea_size(files_struct *fsp)
                return 0;
        }
 
-       mem_ctx = talloc_stackframe();
        if (!lp_ea_support(SNUM(fsp->conn))) {
                return 0;
        }
 
+       mem_ctx = talloc_stackframe();
+
        /* If this is a stream fsp, then we need to instead find the
         * estimated ea len from the main file, not the stream
         * (streams cannot have EAs), but the estimate isn't just 0 in