]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Fix the build with clang
authorVolker Lendecke <vl@samba.org>
Wed, 31 Jul 2019 08:42:24 +0000 (10:42 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 27 Jan 2020 10:53:50 +0000 (10:53 +0000)
clang correctly complains that "close_fsp" is used uninitialized if
"get_posix_fsp" fails and we end up in "goto out;".

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit a8a1ca3f83dce6d725392989cbc97271cbf52f4a)

Autobuild-User(v4-11-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-11-test): Mon Jan 27 10:53:50 UTC 2020 on sn-devel-184

source3/smbd/trans2.c

index b0616f15ade8a4125d2e7a0faaf843f6f80f308c..8164c8fd213922dda4681bf5804c8129437b79b8 100644 (file)
@@ -4848,7 +4848,7 @@ static NTSTATUS smb_query_posix_acl(connection_struct *conn,
        unsigned int size_needed = 0;
        NTSTATUS status;
        bool ok;
-       bool close_fsp;
+       bool close_fsp = false;
 
        /*
         * Ensure we always operate on a file descriptor, not just