"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>
struct smb2_tree *tree)
{
TALLOC_CTX *mem_ctx = talloc_new(tctx);
- struct smb2_handle h, hnew;
+ struct smb2_handle h = {
+ .data = {},
+ };
+ struct smb2_handle hnew = {
+ .data = {},
+ };
NTSTATUS status;
struct smb2_create io;
struct smb2_lease ls;