diff options
author | Jim McDonough <jmcd@samba.org> | 2006-03-13 01:49:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:23 -0500 |
commit | 2167ec9dd5bc3e0a74460bda53d9d64d19c9c899 (patch) | |
tree | 286138e70932efd0b4be43f993c5e8827f470fca | |
parent | 025041eba44452849f2d25f667b4c1fb6888c485 (diff) | |
download | samba-2167ec9dd5bc3e0a74460bda53d9d64d19c9c899.tar.gz samba-2167ec9dd5bc3e0a74460bda53d9d64d19c9c899.tar.bz2 samba-2167ec9dd5bc3e0a74460bda53d9d64d19c9c899.zip |
r14280: Fix Coverity #129 and 130: check before dereferencing a pointer. This
was especially silly as we checked immediately _after_ dereferencing it
:-/
(This used to be commit 7ebfe2cb26b72d7fac397cfe3ceb14f244388224)
-rw-r--r-- | source3/lib/secdesc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/secdesc.c b/source3/lib/secdesc.c index 11f963fa0e..f8873277cf 100644 --- a/source3/lib/secdesc.c +++ b/source3/lib/secdesc.c @@ -336,11 +336,11 @@ NTSTATUS sec_desc_add_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, uint32 SEC_ACE *ace = 0; NTSTATUS status; - *sd_size = 0; - if (!ctx || !psd || !sid || !sd_size) return NT_STATUS_INVALID_PARAMETER; + *sd_size = 0; + status = sec_ace_add_sid(ctx, &ace, psd[0]->dacl->ace, &psd[0]->dacl->num_aces, sid, mask); if (!NT_STATUS_IS_OK(status)) @@ -388,11 +388,11 @@ NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, size_t SEC_ACE *ace = 0; NTSTATUS status; - *sd_size = 0; - if (!ctx || !psd[0] || !sid || !sd_size) return NT_STATUS_INVALID_PARAMETER; + *sd_size = 0; + status = sec_ace_del_sid(ctx, &ace, psd[0]->dacl->ace, &psd[0]->dacl->num_aces, sid); if (!NT_STATUS_IS_OK(status)) |