From be8b0685a55700c6bce3681734800ec6434b0364 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 30 Apr 2007 02:39:34 +0000 Subject: r22589: Make TALLOC_ARRAY consistent across all uses. Jeremy. (This used to be commit 8968808c3b5b0208cbad9ac92eaf948f2c546dd9) --- source3/lib/secdesc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/lib/secdesc.c') diff --git a/source3/lib/secdesc.c b/source3/lib/secdesc.c index 762dc2f6d8..510282bbfb 100644 --- a/source3/lib/secdesc.c +++ b/source3/lib/secdesc.c @@ -480,8 +480,12 @@ SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, the_acl = parent_ctr->dacl; - if (!(new_ace_list = TALLOC_ARRAY(ctx, SEC_ACE, the_acl->num_aces))) - return NULL; + if (the_acl->num_aces) { + if (!(new_ace_list = TALLOC_ARRAY(ctx, SEC_ACE, the_acl->num_aces))) + return NULL; + } else { + new_ace_list = NULL; + } for (i = 0; i < the_acl->num_aces; i++) { SEC_ACE *ace = &the_acl->aces[i]; -- cgit