]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture: Make sure that ctx is initialized to NULL
authorAndreas Schneider <asn@samba.org>
Wed, 10 Jun 2020 16:08:13 +0000 (18:08 +0200)
committerIsaac Boukris <iboukris@sn-devel-184>
Tue, 16 Jun 2020 09:08:34 +0000 (09:08 +0000)
If we go to done and call smbc_free_context() the pointer should be
initialized.

Found by clang.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
source4/torture/libsmbclient/libsmbclient.c

index 18a1af3164b037f313f87952d89a58bbd1806665..3f3992593f9cd50c19752bed5d94bc7f410527b4 100644 (file)
@@ -815,7 +815,7 @@ static bool torture_libsmbclient_readdirplus_seek(struct torture_context *tctx)
 
 static bool torture_libsmbclient_readdirplus2(struct torture_context *tctx)
 {
-       SMBCCTX *ctx;
+       SMBCCTX *ctx = NULL;
        int dhandle = -1;
        int fhandle = -1;
        bool found = false;