]> git.sur5r.net Git - openldap/commitdiff
don't leak reqdata
authorPierangelo Masarati <ando@openldap.org>
Sat, 8 Jan 2011 12:51:43 +0000 (12:51 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 8 Jan 2011 12:51:43 +0000 (12:51 +0000)
libraries/libldap/vc.c

index c5165e8dc2c1010f5a3b7814f0f3e62426566e6f..ef5d09402c12727f4f34653c0f76ce1ab5738f98 100644 (file)
@@ -198,7 +198,7 @@ ldap_verify_credentials(LDAP *ld,
 {
        int rc;
        BerElement *ber;
-       struct berval reqdata;
+       struct berval reqdata;
 
        assert(ld != NULL);
        assert(LDAP_VALID(ld));
@@ -265,14 +265,14 @@ ldap_verify_credentials(LDAP *ld,
        }
 
 
-       rc = ber_flatten(ber, &reqdata);
+       rc = ber_flatten2(ber, &reqdata, 0);
        if (rc == LBER_ERROR) {
                rc = ld->ld_errno = LDAP_ENCODING_ERROR;
                goto done;
        }
 
        rc = ldap_extended_operation(ld, LDAP_EXOP_VERIFY_CREDENTIALS,
-               reqdata, sctrls, cctrls, msgidp);
+               &reqdata, sctrls, cctrls, msgidp);
 
 done:
        ber_free(ber, 1);