Author: vlendec Date: 2006-05-15 03:51:45 +0000 (Mon, 15 May 2006) New Revision: 15608
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15608 Log: Fix a couple of Coverity errors Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c trunk/source/utils/net_rpc_samsync.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c =================================================================== --- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-05-15 01:02:10 UTC (rev 15607) +++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-05-15 03:51:45 UTC (rev 15608) @@ -1043,6 +1043,7 @@ 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 @@ 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 @@ 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 @@ 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 && Modified: trunk/source/utils/net_rpc_samsync.c =================================================================== --- trunk/source/utils/net_rpc_samsync.c 2006-05-15 01:02:10 UTC (rev 15607) +++ trunk/source/utils/net_rpc_samsync.c 2006-05-15 03:51:45 UTC (rev 15608) @@ -1043,6 +1043,7 @@ 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 @@ 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 @@ 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 @@ 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 &&
