From: Pierangelo Masarati Date: Tue, 4 Jan 2011 00:08:12 +0000 (+0000) Subject: quick fix; needs work X-Git-Tag: MIGRATION_CVS2GIT~268 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=180ad95b16d11de79c7a8ad9cb40aca986eb8a45;p=openldap quick fix; needs work --- diff --git a/clients/tools/ldapvc.c b/clients/tools/ldapvc.c index b4f8001acf..fbd85240bd 100644 --- a/clients/tools/ldapvc.c +++ b/clients/tools/ldapvc.c @@ -194,7 +194,7 @@ main( int argc, char *argv[] ) if (req_authzid) { vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *)); vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl)); - vcctrls[nvcctrls]->ldctl_oid = LDAP_CONTROL_AUTHZID_REQUEST; + vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_AUTHZID_REQUEST); vcctrls[nvcctrls]->ldctl_iscritical = 0; vcctrls[nvcctrls]->ldctl_value.bv_val = NULL; vcctrls[nvcctrls]->ldctl_value.bv_len = 0; @@ -202,9 +202,9 @@ main( int argc, char *argv[] ) } if (req_pp) { - if (vcctrls) vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *)); + if (!vcctrls) vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *)); vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl)); - vcctrls[nvcctrls]->ldctl_oid = LDAP_CONTROL_PASSWORDPOLICYREQUEST; + vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_PASSWORDPOLICYREQUEST); vcctrls[nvcctrls]->ldctl_iscritical = 0; vcctrls[nvcctrls]->ldctl_value.bv_val = NULL; vcctrls[nvcctrls]->ldctl_value.bv_len = 0;