mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-31 20:19:34 -05:00
Don't leak SLAPI_RESCONTROLS when free'ing parameter block - these
are allocated by the plugin
This commit is contained in:
parent
a736f237f8
commit
0bcddbc908
1 changed files with 7 additions and 0 deletions
|
|
@ -400,6 +400,7 @@ slapi_pblock_destroy( Slapi_PBlock* pb )
|
|||
{
|
||||
#if defined(LDAP_SLAPI)
|
||||
char *str = NULL;
|
||||
LDAPControl **rescontrols = NULL;
|
||||
|
||||
get( pb, SLAPI_CONN_DN,(void **)&str );
|
||||
if ( str != NULL ) {
|
||||
|
|
@ -436,6 +437,12 @@ slapi_pblock_destroy( Slapi_PBlock* pb )
|
|||
str = NULL;
|
||||
}
|
||||
|
||||
get( pb, SLAPI_RESCONTROLS, (void **)&rescontrols );
|
||||
if ( rescontrols != NULL ) {
|
||||
ldap_controls_free( rescontrols );
|
||||
rescontrols = NULL;
|
||||
}
|
||||
|
||||
ldap_pvt_thread_mutex_destroy( &pb->pblockMutex );
|
||||
|
||||
ch_free( pb );
|
||||
|
|
|
|||
Loading…
Reference in a new issue