diff options
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/secrets.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 28a725a741..6571e6ef6b 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -235,11 +235,13 @@ bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd, /* unpack trusted domain password */ ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &pass, (ndr_pull_flags_fn_t)ndr_pull_TRUSTED_DOM_PASS); + + SAFE_FREE(blob.data); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return false; } - SAFE_FREE(blob.data); /* the trust's password */ if (pwd) { |