From 45205bdf702c5c07c762ec6ac799a5abf8ec5c2c Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 8 Jan 2011 12:51:43 +0000 Subject: [PATCH] don't leak reqdata --- libraries/libldap/vc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.5