summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-07-11 13:10:25 +0200
committerChristian Ambach <ambi@samba.org>2013-07-08 06:00:42 +0200
commit4a9e5d24749f7d8571f107c20ee66092ce7ab21d (patch)
treedd1797266b9fda1a86bc854508acf38bb999a8de /source3
parentca9068189e00ce1714790933250080ab1c310ee5 (diff)
downloadsamba-4a9e5d24749f7d8571f107c20ee66092ce7ab21d.tar.gz
samba-4a9e5d24749f7d8571f107c20ee66092ce7ab21d.tar.bz2
samba-4a9e5d24749f7d8571f107c20ee66092ce7ab21d.zip
s3:idmap_autorid: Add a NULL check in idmap_autorid_preallocate_wellknown
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/idmap_autorid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c
index 493e6df391..16f609d685 100644
--- a/source3/winbindd/idmap_autorid.c
+++ b/source3/winbindd/idmap_autorid.c
@@ -843,6 +843,10 @@ static NTSTATUS idmap_autorid_preallocate_wellknown(struct idmap_domain *dom)
for (i = 0; i < num; i++) {
maps[i] = talloc(maps, struct id_map);
+ if (maps[i] == NULL) {
+ talloc_free(maps);
+ return NT_STATUS_NO_MEMORY;
+ }
maps[i]->xid.type = ID_TYPE_GID;
maps[i]->sid = dom_sid_parse_talloc(maps, groups[i]);
}