mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-21 14:25:24 -05:00
Plug memory leaks
This commit is contained in:
parent
71d76fbeba
commit
a286d07109
3 changed files with 10 additions and 1 deletions
|
|
@ -717,6 +717,9 @@ tool_args( int argc, char **argv )
|
|||
LDAP_VENDOR_NAME, LDAP_VENDOR_VERSION );
|
||||
if (version > 1) exit( EXIT_SUCCESS );
|
||||
}
|
||||
|
||||
ldap_memfree( api.ldapai_vendor_name );
|
||||
ldap_value_free( api.ldapai_extensions );
|
||||
}
|
||||
|
||||
if (protocol == -1)
|
||||
|
|
@ -971,6 +974,9 @@ tool_bind( LDAP *ld )
|
|||
}
|
||||
}
|
||||
#endif
|
||||
if ( ctrls ) {
|
||||
ldap_controls_free( ctrls );
|
||||
}
|
||||
if ( err != LDAP_SUCCESS || msgbuf[0] ) {
|
||||
fprintf( stderr, "ldap_bind: %s%s\n", ldap_err2string( err ),
|
||||
msgbuf );
|
||||
|
|
|
|||
|
|
@ -720,6 +720,9 @@ end_line:
|
|||
if ( newrdn != NULL ) {
|
||||
free( newrdn );
|
||||
}
|
||||
if ( newsup != NULL ) {
|
||||
free( newsup );
|
||||
}
|
||||
if ( pmods != NULL ) {
|
||||
ldap_mods_free( pmods, 1 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -603,7 +603,7 @@ main( int argc, char **argv )
|
|||
{
|
||||
filtpattern = "(objectclass=*)";
|
||||
} else {
|
||||
filtpattern = strdup( argv[optind++] );
|
||||
filtpattern = argv[optind++];
|
||||
}
|
||||
|
||||
if ( argv[optind] != NULL ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue