]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: auth: Add previously missing allocation fail check.
authorJeremy Allison <jra@samba.org>
Tue, 13 Jan 2015 21:49:36 +0000 (13:49 -0800)
committerStefan Metzmacher <metze@samba.org>
Fri, 23 Jan 2015 07:44:10 +0000 (08:44 +0100)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 83066ed539658a9fa6deb897b15b20a0624227fe)

source3/auth/server_info.c

index 7b1cdd574b449ff9ce6c8a36666fdd11596d26c3..b5373904493cbb6a25e4af5c7b5e9c3da26b4436 100644 (file)
@@ -648,6 +648,10 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx,
        }
 
        info3->base.domain_sid = dom_sid_dup(info3, &domain_sid);
+       if (info3->base.domain_sid == NULL) {
+               status = NT_STATUS_NO_MEMORY;
+               goto done;
+       }
 
        ok = sid_peek_check_rid(&domain_sid, &group_sid,
                                &info3->base.primary_gid);