mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
don't leak text/matched
This commit is contained in:
parent
3aca011938
commit
2a24cbb5e8
@ -135,6 +135,12 @@ retry:
|
||||
(char **)&rs->sr_matched,
|
||||
(char **)&rs->sr_text,
|
||||
NULL, NULL, 0 );
|
||||
if ( rs->sr_matched && rs->sr_matched[ 0 ] == '\0' ) {
|
||||
free( (char *)rs->sr_matched );
|
||||
}
|
||||
if ( rs->sr_text && rs->sr_text[ 0 ] == '\0' ) {
|
||||
free( (char *)rs->sr_text );
|
||||
}
|
||||
if ( rc == LDAP_SUCCESS ) {
|
||||
if ( rs->sr_err == LDAP_SUCCESS ) {
|
||||
struct berval newpw;
|
||||
@ -165,6 +171,10 @@ retry:
|
||||
}
|
||||
}
|
||||
send_ldap_result( op, rs );
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
/* these have to be freed anyway... */
|
||||
if ( rs->sr_matched ) {
|
||||
free( (char *)rs->sr_matched );
|
||||
}
|
||||
@ -173,8 +183,6 @@ retry:
|
||||
}
|
||||
rs->sr_matched = NULL;
|
||||
rs->sr_text = NULL;
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
if ( lc != NULL ) {
|
||||
ldap_back_release_conn( op, rs, lc );
|
||||
|
Loading…
Reference in New Issue
Block a user