summaryrefslogtreecommitdiff
path: root/source4/libcli/security/sddl.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-12-10 09:18:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:16 -0500
commit078ae0f8970a1b24a4f15f4dcffbc91d6f64143f (patch)
tree5e9e568cc5feeff8b32d148c463681639ceb751e /source4/libcli/security/sddl.c
parentd811ea17bb3a487b8bdcd2f9aa8dc4ba5cb2ab01 (diff)
downloadsamba-078ae0f8970a1b24a4f15f4dcffbc91d6f64143f.tar.gz
samba-078ae0f8970a1b24a4f15f4dcffbc91d6f64143f.tar.bz2
samba-078ae0f8970a1b24a4f15f4dcffbc91d6f64143f.zip
r12161: Fix a memleak and do the -O1 janitor :-)
(This used to be commit 82d87d62614a33ec9d2ed20e63d80a7af64e8678)
Diffstat (limited to 'source4/libcli/security/sddl.c')
-rw-r--r--source4/libcli/security/sddl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/libcli/security/sddl.c b/source4/libcli/security/sddl.c
index 7d7fe856cd..83dfeed5ac 100644
--- a/source4/libcli/security/sddl.c
+++ b/source4/libcli/security/sddl.c
@@ -448,12 +448,16 @@ static char *sddl_encode_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
static char *sddl_encode_ace(TALLOC_CTX *mem_ctx, const struct security_ace *ace,
const struct dom_sid *domain_sid)
{
- char *sddl;
+ char *sddl = NULL;
TALLOC_CTX *tmp_ctx;
const char *s_type="", *s_flags="", *s_mask="",
*s_object="", *s_iobject="", *s_trustee="";
tmp_ctx = talloc_new(mem_ctx);
+ if (tmp_ctx == NULL) {
+ DEBUG(0, ("talloc_new failed\n"));
+ return NULL;
+ }
s_type = sddl_flags_to_string(tmp_ctx, ace_types, ace->type, True);
if (s_type == NULL) goto failed;