diff --git a/libcli/auth/credentials.c b/libcli/auth/credentials.c index a6770d87cf8..86bb8c33819 100644 --- a/libcli/auth/credentials.c +++ b/libcli/auth/credentials.c @@ -492,6 +492,7 @@ netlogon_creds_alloc(TALLOC_CTX *mem_ctx, struct netlogon_creds_CredentialState *creds = NULL; struct timeval tv = timeval_current(); NTTIME now = timeval_to_nttime(&tv); + const char *name = NULL; creds = talloc_zero(mem_ctx, struct netlogon_creds_CredentialState); if (creds == NULL) { @@ -523,6 +524,8 @@ netlogon_creds_alloc(TALLOC_CTX *mem_ctx, creds->client_sid = global_sid_NULL; } + name = talloc_get_name(creds); + _talloc_keep_secret(creds, name); return creds; }