summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 2abf060a0f..6980fe48b8 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -496,6 +496,9 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r
continue;
}
ASN1_MALLOC_ENCODE(Key, buf, buf_size, &keys[i], &len, krb5_ret);
+ if (krb5_ret) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
val.data = talloc_memdup(req, buf, len);
val.length = len;
@@ -549,6 +552,9 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r
return LDB_ERR_OPERATIONS_ERROR;
}
ASN1_MALLOC_ENCODE(Key, buf, buf_size, &key, &len, krb5_ret);
+ if (krb5_ret) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
krb5_free_keyblock_contents(smb_krb5_context->krb5_context,
&key.key);