From: Pierangelo Masarati Date: Sat, 8 Jan 2011 12:51:43 +0000 (+0000) Subject: don't leak reqdata X-Git-Tag: MIGRATION_CVS2GIT~217 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=45205bdf702c5c07c762ec6ac799a5abf8ec5c2c;p=openldap don't leak reqdata --- diff --git a/libraries/libldap/vc.c b/libraries/libldap/vc.c index c5165e8dc2..ef5d09402c 100644 --- a/libraries/libldap/vc.c +++ b/libraries/libldap/vc.c @@ -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);