mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:torture: Make sure struct smb2_handle is initialized
"Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/smb2/lease.c:1223: var_decl: Declaring variable ""h2"" without initializer. samba-4.20.0rc2/source4/torture/smb2/lease.c:1328: uninit_use_in_call: Using uninitialized value ""h2"" when calling ""smb2_util_close"". 1326| done: 1327| smb2_util_close(tree, h); 1328|-> smb2_util_close(tree, h2); 1329| 1330| smb2_util_unlink(tree, fname);" Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
This commit is contained in:
parent
1478619363
commit
9ec0f8bd60
@ -1225,7 +1225,12 @@ static bool test_lease_oplock(struct torture_context *tctx,
|
||||
TALLOC_CTX *mem_ctx = talloc_new(tctx);
|
||||
struct smb2_create io;
|
||||
struct smb2_lease ls;
|
||||
struct smb2_handle h, h2;
|
||||
struct smb2_handle h = {
|
||||
.data = {0},
|
||||
};
|
||||
struct smb2_handle h2 = {
|
||||
.data = {0},
|
||||
};
|
||||
NTSTATUS status;
|
||||
const char *fname = "lease_oplock.dat";
|
||||
bool ret = true;
|
||||
|
Loading…
Reference in New Issue
Block a user