summaryrefslogtreecommitdiff
path: root/source3
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
commit725fcf3461f7684554938c5571a5013408ff431c (patch)
tree2e2350836a6d6a299b9332d4dd6d339c0450d131 /source3
parent4c6dfcf95429f27a194e0d6b5ac568d94aa40adc (diff)
downloadsamba-725fcf3461f7684554938c5571a5013408ff431c.tar.gz
samba-725fcf3461f7684554938c5571a5013408ff431c.tar.bz2
samba-725fcf3461f7684554938c5571a5013408ff431c.zip
r22112: Fix memleak pointed out by Steven Danneman <steven.danneman@isilon.com>.
Jeremy. (This used to be commit 7c45bd3a47fc2b24c5f1351a241ace2201c857d2)
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/ldap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 1d08a01a26..b2ca68f67f 100644
--- a/source3/libads/ldap.c
+++ b/source3/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);