From b2bace63d38690a32abcf2f82059dba6c1148d44 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 15 Nov 2011 11:47:42 +0100 Subject: [PATCH] s4:drsuapi/getncchanges: return WERR_NOMEM if talloc_array() fails metze --- source4/rpc_server/drsuapi/getncchanges.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c index efd2e638f27..f6e4573942d 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 -- 2.11.4.GIT