From 180ad95b16d11de79c7a8ad9cb40aca986eb8a45 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 4 Jan 2011 00:08:12 +0000 Subject: [PATCH] quick fix; needs work --- clients/tools/ldapvc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.39.5