diff options
author | Jeremy Allison <jra@samba.org> | 2007-04-30 02:51:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:49 -0500 |
commit | 603233a98bbf65467c8b4f04719d771c70b3b4c9 (patch) | |
tree | 856e0a4d460b44df2cedec8ac885b54e73fd0a1c /source/lib | |
parent | 8968808c3b5b0208cbad9ac92eaf948f2c546dd9 (diff) | |
download | samba-603233a98bbf65467c8b4f04719d771c70b3b4c9.tar.gz samba-603233a98bbf65467c8b4f04719d771c70b3b4c9.tar.xz samba-603233a98bbf65467c8b4f04719d771c70b3b4c9.zip |
r22590: Make TALLOC_ARRAY consistent across all uses.
That should be it....
Jeremy.
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/secace.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/lib/secace.c b/source/lib/secace.c index d60722c57ee..871c983533d 100644 --- a/source/lib/secace.c +++ b/source/lib/secace.c @@ -122,8 +122,12 @@ NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, uint32 if (!ctx || !pp_new || !old || !sid || !num) return NT_STATUS_INVALID_PARAMETER; - if((pp_new[0] = TALLOC_ZERO_ARRAY(ctx, SEC_ACE, *num )) == 0) - return NT_STATUS_NO_MEMORY; + if (*num) { + if((pp_new[0] = TALLOC_ZERO_ARRAY(ctx, SEC_ACE, *num )) == 0) + return NT_STATUS_NO_MEMORY; + } else { + pp_new[0] = NULL; + } for (i = 0; i < *num; i ++) { if (sid_compare(&old[i].trustee, sid) != 0) |