From: Howard Chu Date: Thu, 5 Jun 2003 04:33:58 +0000 (+0000) Subject: ITS#2574 fix typo in prev commit. X-Git-Tag: OPENLDAP_REL_ENG_2_1_22~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35aad64de18027fbde8fb4079de3c513a62cb235;p=thirdparty%2Fopenldap.git ITS#2574 fix typo in prev commit. Also don't malloc prompt results any more. (This has leaked since 2.1.18) --- diff --git a/contrib/ldapsasl/ldapdb.c b/contrib/ldapsasl/ldapdb.c index 8e46dbcc2d..f0f7e4069b 100644 --- a/contrib/ldapsasl/ldapdb.c +++ b/contrib/ldapsasl/ldapdb.c @@ -74,10 +74,7 @@ static int ldapdb_interact(LDAP *ld, unsigned flags __attribute__((unused)), } if (p.bv_val) { - in->result = gc->lp->utils->malloc(p.bv_len+1); - if (!in->result) - return LDAP_NO_MEMORY; - strcpy((char *)in->result, p.bv_val); + in->result = p.bv_val; in->len = p.bv_len; } } @@ -220,7 +217,7 @@ int ldapdb_auxprop_plug_init(const sasl_utils_t *utils, if(!tmp.uri) return SASL_BADPARAM; utils->getopt(utils->getopt_context, ldapdb, "ldapdb_id", - (const char **)&tmp.id.bv_val, (unsigned *)tmp.id.bv_len); + (const char **)&tmp.id.bv_val, (unsigned *)&tmp.id.bv_len); utils->getopt(utils->getopt_context, ldapdb, "ldapdb_pw", (const char **)&tmp.pw.bv_val, (unsigned *)&tmp.pw.bv_len); utils->getopt(utils->getopt_context, ldapdb, "ldapdb_mech",