Plug memory leaks

This commit is contained in:
Hallvard Furuseth 2010-12-20 10:51:14 +00:00
parent 9e6331f14f
commit 78a0be6a42
4 changed files with 12 additions and 3 deletions

View file

@ -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 );

View file

@ -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 );
}

View file

@ -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

View file

@ -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] );
}