diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-08-29 09:09:10 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-08-29 09:09:10 +1000 |
commit | bcc29f9e7317601737858184f5ec6243552e0c0c (patch) | |
tree | a2606ca080a8dad4633cf5f46f81f4534fb39814 /auth/credentials | |
parent | ba862f47d78e0077d3e01dd84635b76850314436 (diff) | |
download | samba-bcc29f9e7317601737858184f5ec6243552e0c0c.tar.gz samba-bcc29f9e7317601737858184f5ec6243552e0c0c.tar.bz2 samba-bcc29f9e7317601737858184f5ec6243552e0c0c.zip |
auth/credentials: Avoid double-free in the failure case
This pointer is only valid if dbwrap_fetch returned success.
Andrew Bartlett
Diffstat (limited to 'auth/credentials')
-rw-r--r-- | auth/credentials/credentials_secrets.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c index 3304200607..37e825bee9 100644 --- a/auth/credentials/credentials_secrets.c +++ b/auth/credentials/credentials_secrets.c @@ -235,8 +235,8 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cr TALLOC_FREE(keystr_upper); if (NT_STATUS_IS_OK(status) && dbuf.dsize == 4) { secrets_tdb_lct = IVAL(dbuf.dptr,0); + TALLOC_FREE(dbuf.dptr); } - TALLOC_FREE(dbuf.dptr); keystr = talloc_asprintf(cred, "%s/%s", SECRETS_MACHINE_PASSWORD, |