mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
ITS#9997 syncrepl: plug potential leak in changelog search
Note this is only used with changelog, which is nonstandard and obsolete.
This commit is contained in:
parent
d9507a834c
commit
4a9e449b24
1 changed files with 3 additions and 1 deletions
|
|
@ -604,8 +604,10 @@ ldap_sync_search(
|
||||||
lattrs[2] = NULL;
|
lattrs[2] = NULL;
|
||||||
rc = ldap_search_ext_s( si->si_ld, "", LDAP_SCOPE_BASE, generic_filterstr.bv_val, lattrs, 0,
|
rc = ldap_search_ext_s( si->si_ld, "", LDAP_SCOPE_BASE, generic_filterstr.bv_val, lattrs, 0,
|
||||||
NULL, NULL, NULL, si->si_slimit, &res );
|
NULL, NULL, NULL, si->si_slimit, &res );
|
||||||
if ( rc )
|
if ( rc ) {
|
||||||
|
ldap_msgfree( res );
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
msg = ldap_first_message( si->si_ld, res );
|
msg = ldap_first_message( si->si_ld, res );
|
||||||
if ( msg && ldap_msgtype( msg ) == LDAP_RES_SEARCH_ENTRY ) {
|
if ( msg && ldap_msgtype( msg ) == LDAP_RES_SEARCH_ENTRY ) {
|
||||||
BerElement *ber = NULL;
|
BerElement *ber = NULL;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue