abandon <proc>
# This is one of the biggest pluses of using the tcl backend.
-# The realm let's you group several databases to the same interpreter.
+# The realm lets you group several databases to the same interpreter.
# This basically means they share the same global variables and proc
# space. So global variables, as well as all the procs, are callable
# between databases. If no tclrealm is specified, it is put into the
msgid - The msgid of this ldap session
suffix - List of suffix(es) associated with the call. Each one
is and entry in a tcl formatted list (surrounded by {}'s)
- dn - DN who's RDN is being renamed
+ dn - DN whose RDN is being renamed
newrdn - New RDN
deleteoldrdn - Boolean stating whether or not the old RDN should
be removed after being renamed
for (i = 0, an = attrs; an && an->an_name.bv_val; an++, i++);
if (i > 0) {
- char *sattrs[i+1];
-
+ char **sattrs = ch_malloc( (i+1) * sizeof(char *));
for (i = 0, an = attrs; an->an_name.bv_val; an++, i++)
sattrs[i] = an->an_name.bv_val;
sattrs[i] = NULL;
attrs_tcl = Tcl_Merge (i, sattrs);
+ ch_free(sattrs);
}
if (tcl_merge_bvlist (be->be_suffix, &suf_tcl) == NULL) {
for (i = 0; bvlist[i] != NULL; i++);
if (i) {
- char *strlist[i + 1];
+ char **strlist = ch_malloc ((i + 1) * sizeof(char *));
+ if (strlist == NULL) {
+ if (out == NULL)
+ ch_free (ret);
+ return NULL;
+ }
for (i = 0; bvlist[i] != NULL; i++) {
strlist[i] = bvlist[i]->bv_val;
}
strlist[i] = NULL;
ret->bv_val = Tcl_Merge(i, strlist);
ret->bv_len = ret->bv_val ? strlen(ret->bv_val) : 0;
+ ch_free (strlist);
}
return ret;