summaryrefslogtreecommitdiffstats
path: root/source/libads
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-06 21:55:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:14 -0500
commit7c45bd3a47fc2b24c5f1351a241ace2201c857d2 (patch)
tree34305a604648086a8cde62798cd9bdd23cdde170 /source/libads
parente296f07e1d3a14fe05a444ccdc752cd945fee5bc (diff)
downloadsamba-7c45bd3a47fc2b24c5f1351a241ace2201c857d2.tar.gz
samba-7c45bd3a47fc2b24c5f1351a241ace2201c857d2.tar.xz
samba-7c45bd3a47fc2b24c5f1351a241ace2201c857d2.zip
r22112: Fix memleak pointed out by Steven Danneman <steven.danneman@isilon.com>.
Jeremy.
Diffstat (limited to 'source/libads')
-rw-r--r--source/libads/ldap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index 1d08a01a263..b2ca68f67fe 100644
--- a/source/libads/ldap.c
+++ b/source/libads/ldap.c
@@ -2258,7 +2258,6 @@ int ads_count_replies(ADS_STRUCT *ads, void *res)
LDAPMessage *msg, const char *field, SEC_DESC **sd)
{
struct berval **values;
- prs_struct ps;
BOOL ret = False;
values = ldap_get_values_len(ads->ld, msg, field);
@@ -2266,11 +2265,13 @@ int ads_count_replies(ADS_STRUCT *ads, void *res)
if (!values) return False;
if (values[0]) {
+ prs_struct ps;
prs_init(&ps, values[0]->bv_len, mem_ctx, UNMARSHALL);
prs_copy_data_in(&ps, values[0]->bv_val, values[0]->bv_len);
prs_set_offset(&ps,0);
ret = sec_io_desc("sd", sd, &ps, 1);
+ prs_mem_free(&ps);
}
ldap_value_free_len(values);