summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-15 11:47:42 +0100
committerMatthieu Patou <mat@matws.net>2011-12-19 11:49:19 +0100
commitb2bace63d38690a32abcf2f82059dba6c1148d44 (patch)
treeae02bcb5f6a9b0e24e164d38062f3b177781034c /source4
parent3164d7bdd5e329ad15711d04da4813df7a39a547 (diff)
downloadsamba-b2bace63d38690a32abcf2f82059dba6c1148d44.tar.gz
samba-b2bace63d38690a32abcf2f82059dba6c1148d44.tar.bz2
samba-b2bace63d38690a32abcf2f82059dba6c1148d44.zip
s4:drsuapi/getncchanges: return WERR_NOMEM if talloc_array() fails
metze
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index efd2e638f2..f6e4573942 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -283,6 +283,9 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
obj->object.attribute_ctr.num_attributes = obj->meta_data_ctr->count;
obj->object.attribute_ctr.attributes = talloc_array(obj, struct drsuapi_DsReplicaAttribute,
obj->object.attribute_ctr.num_attributes);
+ if (obj->object.attribute_ctr.attributes == NULL) {
+ return WERR_NOMEM;
+ }
/*
* Note that the meta_data array and the attributes array must