diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-05-15 03:51:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:03 -0500 |
commit | bb4856b14afcaf488d5bc960e881e8734feb532f (patch) | |
tree | e6d0a5a0c4b935e8757c3a0a182224de7173ff6b /source3/utils | |
parent | 75d2304643c6935c0705b1a8ae2ea73a527f2f97 (diff) | |
download | samba-bb4856b14afcaf488d5bc960e881e8734feb532f.tar.gz samba-bb4856b14afcaf488d5bc960e881e8734feb532f.tar.bz2 samba-bb4856b14afcaf488d5bc960e881e8734feb532f.zip |
r15608: Fix a couple of Coverity errors
(This used to be commit 696e210bf6688e8b2f408559768173b4bdbda979)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index d13d5b1cb3..ef9a0627b5 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -1043,6 +1043,7 @@ static NTSTATUS populate_ldap_for_ldif(fstring sid, const char *suffix, const ch user_suffix = lp_ldap_user_suffix(); if (user_suffix == NULL) { + SAFE_FREE(suffix_attr); return NT_STATUS_NO_MEMORY; } /* If it exists and is distinct from other containers, @@ -1060,6 +1061,8 @@ static NTSTATUS populate_ldap_for_ldif(fstring sid, const char *suffix, const ch group_suffix = lp_ldap_group_suffix(); if (group_suffix == NULL) { + SAFE_FREE(suffix_attr); + SAFE_FREE(user_attr); return NT_STATUS_NO_MEMORY; } /* If it exists and is distinct from other containers, @@ -1078,6 +1081,9 @@ static NTSTATUS populate_ldap_for_ldif(fstring sid, const char *suffix, const ch Write the Computers entity */ machine_suffix = lp_ldap_machine_suffix(); if (machine_suffix == NULL) { + SAFE_FREE(suffix_attr); + SAFE_FREE(user_attr); + SAFE_FREE(group_attr); return NT_STATUS_NO_MEMORY; } if (*machine_suffix && strcmp(machine_suffix, user_suffix) && @@ -1099,6 +1105,9 @@ static NTSTATUS populate_ldap_for_ldif(fstring sid, const char *suffix, const ch Write the IdMap entity */ idmap_suffix = lp_ldap_idmap_suffix(); if (idmap_suffix == NULL) { + SAFE_FREE(suffix_attr); + SAFE_FREE(user_attr); + SAFE_FREE(group_attr); return NT_STATUS_NO_MEMORY; } if (*idmap_suffix && |