libcli/auth: initialize creds in netlogon_creds_client_init_session_key()
[ira/wip.git] / libcli / auth / credentials.c
index 87d1866ca49fbd11c0628723a643f4cf86235d87..667a2fac2de369c4e2cc4360488a1d5daed0dd6d 100644 (file)
@@ -248,8 +248,9 @@ struct netlogon_creds_CredentialState *netlogon_creds_client_init(TALLOC_CTX *me
 struct netlogon_creds_CredentialState *netlogon_creds_client_init_session_key(TALLOC_CTX *mem_ctx, 
                                                                              const uint8_t session_key[16])
 {
-       struct netlogon_creds_CredentialState *creds = talloc(mem_ctx, struct netlogon_creds_CredentialState);
-       
+       struct netlogon_creds_CredentialState *creds;
+
+       creds = talloc_zero(mem_ctx, struct netlogon_creds_CredentialState);
        if (!creds) {
                return NULL;
        }