From: Andreas Schneider Date: Wed, 10 Jun 2020 16:08:13 +0000 (+0200) Subject: s4:torture: Make sure that ctx is initialized to NULL X-Git-Tag: ldb-2.2.0~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7204f3c9ee73b3673a263d2a7e5dfb9251906f5;p=thirdparty%2Fsamba.git s4:torture: Make sure that ctx is initialized to NULL If we go to done and call smbc_free_context() the pointer should be initialized. Found by clang. Signed-off-by: Andreas Schneider Reviewed-by: Isaac Boukris --- diff --git a/source4/torture/libsmbclient/libsmbclient.c b/source4/torture/libsmbclient/libsmbclient.c index 18a1af3164b..3f3992593f9 100644 --- a/source4/torture/libsmbclient/libsmbclient.c +++ b/source4/torture/libsmbclient/libsmbclient.c @@ -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;