summaryrefslogtreecommitdiffstats
path: root/source/libads/ldap_printer.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-12-07 18:25:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:32 -0500
commit620f2e608f70ba92f032720c031283d295c5c06a (patch)
treeec3dd5fcf29eaa98a26ddeae3acb7a89fd0e0fb8 /source/libads/ldap_printer.c
parent12440744ba36445186042c8c254785766cce5385 (diff)
downloadsamba-620f2e608f70ba92f032720c031283d295c5c06a.tar.gz
samba-620f2e608f70ba92f032720c031283d295c5c06a.tar.xz
samba-620f2e608f70ba92f032720c031283d295c5c06a.zip
r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
Diffstat (limited to 'source/libads/ldap_printer.c')
-rw-r--r--source/libads/ldap_printer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/libads/ldap_printer.c b/source/libads/ldap_printer.c
index d8e4cefcfaa..68e67358910 100644
--- a/source/libads/ldap_printer.c
+++ b/source/libads/ldap_printer.c
@@ -161,10 +161,9 @@ static BOOL map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
};
if (num_vals) {
- str_values = talloc(ctx,
- (num_vals + 1) * sizeof(smb_ucs2_t *));
+ str_values = TALLOC_ARRAY(ctx, char *, num_vals + 1);
memset(str_values, '\0',
- (num_vals + 1) * sizeof(smb_ucs2_t *));
+ (num_vals + 1) * sizeof(char *));
cur_str = (smb_ucs2_t *) value->data_p;
for (i=0; i < num_vals; i++)