]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpc_server: Initialize variables in get_md4pw()
authorVolker Lendecke <vl@samba.org>
Sun, 14 Mar 2021 09:18:12 +0000 (10:18 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 16 Mar 2021 17:09:32 +0000 (17:09 +0000)
My gcc complained at one point about uninitialized vars

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_server/netlogon/srv_netlog_nt.c

index 88b32f468647faae55ca5dc5903bba2bdb1057b4..eaacd8dbc6abd86a4255143d243796e533d5cc29 100644 (file)
@@ -629,15 +629,15 @@ static NTSTATUS get_md4pw(struct samr_Password *md4pw, const char *mach_acct,
 {
        NTSTATUS status;
        NTSTATUS result = NT_STATUS_OK;
-       TALLOC_CTX *mem_ctx;
+       TALLOC_CTX *mem_ctx = NULL;
        struct dcerpc_binding_handle *h = NULL;
-       struct tsocket_address *local;
-       struct policy_handle user_handle;
-       uint32_t user_rid;
-       struct dom_sid *domain_sid;
-       uint32_t acct_ctrl;
-       union samr_UserInfo *info;
-       struct auth_session_info *session_info;
+       struct tsocket_address *local = NULL;
+       struct policy_handle user_handle = { .handle_type = 0 };
+       uint32_t user_rid = UINT32_MAX;
+       struct dom_sid *domain_sid = NULL;
+       uint32_t acct_ctrl = 0;
+       union samr_UserInfo *info = NULL;
+       struct auth_session_info *session_info = NULL;
        int rc;
 
 #if 0