summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/auth_util.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/auth/auth_util.c b/source4/auth/auth_util.c
index baecb15f1e..b1f0e60507 100644
--- a/source4/auth/auth_util.c
+++ b/source4/auth/auth_util.c
@@ -81,7 +81,9 @@ NTSTATUS map_user_info(TALLOC_CTX *mem_ctx,
if (!*user_info_mapped) {
return NT_STATUS_NO_MEMORY;
}
- talloc_reference(*user_info_mapped, user_info);
+ if (!talloc_reference(*user_info_mapped, user_info)) {
+ return NT_STATUS_NO_MEMORY;
+ }
**user_info_mapped = *user_info;
(*user_info_mapped)->mapped_state = true;
(*user_info_mapped)->mapped.domain_name = talloc_strdup(*user_info_mapped, domain);
@@ -129,7 +131,9 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
if (!user_info_temp) {
return NT_STATUS_NO_MEMORY;
}
- talloc_reference(user_info_temp, user_info_in);
+ if (!talloc_reference(user_info_temp, user_info_in)) {
+ return NT_STATUS_NO_MEMORY;
+ }
*user_info_temp = *user_info_in;
user_info_temp->mapped_state = to_state;
@@ -193,7 +197,9 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
if (!user_info_temp) {
return NT_STATUS_NO_MEMORY;
}
- talloc_reference(user_info_temp, user_info_in);
+ if (!talloc_reference(user_info_temp, user_info_in)) {
+ return NT_STATUS_NO_MEMORY;
+ }
*user_info_temp = *user_info_in;
user_info_temp->mapped_state = to_state;