git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba862f4
)
auth/credentials: Avoid double-free in the failure case
author
Andrew Bartlett
<abartlet@samba.org>
Tue, 28 Aug 2012 23:09:10 +0000
(09:09 +1000)
committer
Andrew Bartlett
<abartlet@samba.org>
Tue, 28 Aug 2012 23:09:10 +0000
(09:09 +1000)
This pointer is only valid if dbwrap_fetch returned success.
Andrew Bartlett
auth/credentials/credentials_secrets.c
patch
|
blob
|
history
diff --git
a/auth/credentials/credentials_secrets.c
b/auth/credentials/credentials_secrets.c
index 33042006075cd59013423f856c6d0ee7b0ccbf0d..37e825bee90194c3eb11832b51547baf8fd035cc 100644
(file)
--- 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,