mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
s4:torture: Initialize struct smb2_handle
"Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/smb2/lease.c:336: var_decl: Declaring variable ""hnew"" without initializer. samba-4.20.0rc2/source4/torture/smb2/lease.c:377: uninit_use_in_call: Using uninitialized value ""hnew"" when calling ""smb2_util_close"". 375| done: 376| smb2_util_close(tree, h); 377|-> smb2_util_close(tree, hnew); 378| 379| smb2_util_unlink(tree, fname);" Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
parent
4777464946
commit
09d731470e
@ -333,7 +333,12 @@ static bool test_lease_upgrade2(struct torture_context *tctx,
|
|||||||
struct smb2_tree *tree)
|
struct smb2_tree *tree)
|
||||||
{
|
{
|
||||||
TALLOC_CTX *mem_ctx = talloc_new(tctx);
|
TALLOC_CTX *mem_ctx = talloc_new(tctx);
|
||||||
struct smb2_handle h, hnew;
|
struct smb2_handle h = {
|
||||||
|
.data = {},
|
||||||
|
};
|
||||||
|
struct smb2_handle hnew = {
|
||||||
|
.data = {},
|
||||||
|
};
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct smb2_create io;
|
struct smb2_create io;
|
||||||
struct smb2_lease ls;
|
struct smb2_lease ls;
|
||||||
|
Loading…
Reference in New Issue
Block a user