mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Plug memory leaks
This commit is contained in:
parent
9e6331f14f
commit
78a0be6a42
4 changed files with 12 additions and 3 deletions
|
|
@ -714,7 +714,7 @@ static int process_response(
|
|||
|
||||
if ( text ) ldap_memfree( text );
|
||||
if ( matched ) ldap_memfree( matched );
|
||||
if ( text ) ber_memvfree( (void **)refs );
|
||||
if ( refs ) ber_memvfree( (void **)refs );
|
||||
|
||||
if ( ctrls ) {
|
||||
tool_print_ctrls( ld, ctrls );
|
||||
|
|
|
|||
|
|
@ -770,6 +770,12 @@ retcode_item_destroy( retcode_item_t *rdi )
|
|||
|
||||
entry_clean( &rdi->rdi_e );
|
||||
|
||||
if ( !BER_BVISNULL( &rdi->rdi_unsolicited_oid ) ) {
|
||||
ber_memfree( rdi->rdi_unsolicited_oid.bv_val );
|
||||
if ( !BER_BVISNULL( &rdi->rdi_unsolicited_data ) )
|
||||
ber_memfree( rdi->rdi_unsolicited_data.bv_val );
|
||||
}
|
||||
|
||||
ch_free( rdi );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4059,6 +4059,7 @@ config_suffixm( ConfigArgs *c, syncinfo_t *si )
|
|||
|
||||
rc = rewrite_parse( si->si_rewrite, c->fname, c->lineno, 4, argvRule );
|
||||
ch_free( vnc );
|
||||
ch_free( rnc );
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -303,6 +303,8 @@ done:;
|
|||
fprintf( stderr, " PID=%ld - Modrdn done (%d).\n", (long) pid, rc );
|
||||
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
|
||||
free( DNs[1] );
|
||||
free( rdns[0] );
|
||||
free( rdns[1] );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue