mem cleanup (see ITS#6005) not worth chasing them all down

This commit is contained in:
Howard Chu 2009-03-07 01:31:34 +00:00
parent 86afc76f8e
commit 7029d640cb
2 changed files with 5 additions and 5 deletions

View File

@ -647,7 +647,7 @@ tool_args( int argc, char **argv )
}
}
tmpctrls = (LDAPControl *)realloc( unknown_ctrls,
tmpctrls = (LDAPControl *)ber_memrealloc( unknown_ctrls,
(unknown_ctrls_num + 1)*sizeof( LDAPControl ) );
if ( tmpctrls == NULL ) {
fprintf( stderr, "%s: no memory?\n", prog );
@ -1193,7 +1193,7 @@ tool_conn_setup( int dont, void (*private_setup)( LDAP * ) )
for ( i = 0; hosts[ i ] != NULL; i++ )
/* count'em */ ;
tmp = (char **)realloc( urls, sizeof( char * ) * ( nurls + i + 1 ) );
tmp = (char **)ber_memrealloc( urls, sizeof( char * ) * ( nurls + i + 1 ) );
if ( tmp == NULL ) {
fprintf( stderr,
"DNS SRV: out of memory?\n" );
@ -1227,7 +1227,7 @@ dnssrv_free:;
ber_memfree( domain );
} else {
tmp = (char **)realloc( urls, sizeof( char * ) * ( nurls + 2 ) );
tmp = (char **)ber_memrealloc( urls, sizeof( char * ) * ( nurls + 2 ) );
if ( tmp == NULL ) {
fprintf( stderr,
"DNS SRV: out of memory?\n" );

View File

@ -1034,8 +1034,8 @@ getNextPage:
tool_server_controls( ld, c, i );
ber_free( seber, 1 );
ber_free( vrber, 1 );
if ( seber ) ber_free( seber, 1 );
if ( vrber ) ber_free( vrber, 1 );
/* step back to the original number of controls, so that
* those set while parsing args are preserved */