mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
ldap_parse_result should always free result when freeit is true.
This commit is contained in:
parent
063c844b2a
commit
abdb6c683f
1 changed files with 8 additions and 6 deletions
|
|
@ -281,11 +281,11 @@ ldap_parse_result(
|
|||
}
|
||||
|
||||
if( lm == NULL ) {
|
||||
ld->ld_errno = LDAP_NO_RESULTS_RETURNED;
|
||||
errcode = ld->ld_errno = LDAP_NO_RESULTS_RETURNED;
|
||||
#ifdef LDAP_R_COMPILE
|
||||
ldap_pvt_thread_mutex_unlock( &ld->ld_res_mutex );
|
||||
#endif
|
||||
return ld->ld_errno;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if ( ld->ld_error ) {
|
||||
|
|
@ -391,12 +391,14 @@ ldap_parse_result(
|
|||
}
|
||||
}
|
||||
|
||||
if ( freeit ) {
|
||||
ldap_msgfree( r );
|
||||
}
|
||||
#ifdef LDAP_R_COMPILE
|
||||
ldap_pvt_thread_mutex_unlock( &ld->ld_res_mutex );
|
||||
#endif
|
||||
|
||||
return( errcode );
|
||||
done:
|
||||
if ( freeit ) {
|
||||
ldap_msgfree( r );
|
||||
}
|
||||
|
||||
return errcode;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue