summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-12-12 10:13:08 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:45 +0100
commit5bddcf45f30e1a30511141e86232c7378073f629 (patch)
tree5585cc79c539c62317d7a72e91118cf351e8760c /source4
parenta7f008a9398247b9bb08e040ee5c3510bc0f7b5f (diff)
downloadsamba-5bddcf45f30e1a30511141e86232c7378073f629.tar.gz
samba-5bddcf45f30e1a30511141e86232c7378073f629.tar.bz2
samba-5bddcf45f30e1a30511141e86232c7378073f629.zip
r26413: we should check the return value of talloc_reference()
metze (This used to be commit 5f49c1b144d811c4d8bd74d786e5c5ef6fa7cbc3)
Diffstat (limited to 'source4')
-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;