summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-12-31 10:57:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:00 -0500
commite0c989c9492a2fd79a94396d2f0b5a9685f56122 (patch)
tree404cad16234d02080e61c8cae2e8b788d26b6e8f /source3
parent1de83ea53bc341c182a65f2154bb564303e40dcb (diff)
downloadsamba-e0c989c9492a2fd79a94396d2f0b5a9685f56122.tar.gz
samba-e0c989c9492a2fd79a94396d2f0b5a9685f56122.tar.bz2
samba-e0c989c9492a2fd79a94396d2f0b5a9685f56122.zip
r12645: Fix some memleaks. This will also be in the trunk checkin that comes next.
Volker (This used to be commit dc167037b0f3bada390dfdb820cb84ed9a4cfdcf)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_ldap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 74ed907a87..0bf051eecd 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -4070,6 +4070,9 @@ static BOOL ldapgroup2displayentry(struct ldap_search_state *state,
vals = ldap_get_values(ld, entry, "sambaGroupType");
if ((vals == NULL) || (vals[0] == NULL)) {
DEBUG(5, ("\"sambaGroupType\" not found\n"));
+ if (vals != NULL) {
+ ldap_value_free(vals);
+ }
return False;
}
@@ -4077,9 +4080,12 @@ static BOOL ldapgroup2displayentry(struct ldap_search_state *state,
if ((state->group_type != 0) &&
((state->group_type != group_type))) {
+ ldap_value_free(vals);
return False;
}
+ ldap_value_free(vals);
+
/* display name is the NT group name */
vals = ldap_get_values(ld, entry, "displayName");
@@ -4119,6 +4125,9 @@ static BOOL ldapgroup2displayentry(struct ldap_search_state *state,
vals = ldap_get_values(ld, entry, "sambaSid");
if ((vals == NULL) || (vals[0] == NULL)) {
DEBUG(0, ("\"objectSid\" not found\n"));
+ if (vals != NULL) {
+ ldap_value_free(vals);
+ }
return False;
}