X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=clients%2Ftools%2Fldapexop.c;h=4e3f48ac6646b30c6db9a2bfbf918e1b745f6fc9;hb=3743a5a68e4d608949d5fd04904733ee5c1ac959;hp=6fc4d1e3c6b3a1f93746ff3f6bbf92fb85a52e9e;hpb=8623c98726058d801aea6ee505ea307618334bc2;p=openldap diff --git a/clients/tools/ldapexop.c b/clients/tools/ldapexop.c index 6fc4d1e3c6..4e3f48ac66 100644 --- a/clients/tools/ldapexop.c +++ b/clients/tools/ldapexop.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2005-2011 The OpenLDAP Foundation. + * Copyright 2005-2012 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -213,7 +213,7 @@ main( int argc, char *argv[] ) struct timeval tv; if ( tool_check_abandon( ld, id ) ) { - return LDAP_CANCELLED; + tool_exit( ld, LDAP_CANCELLED ); } tv.tv_sec = 0; @@ -351,8 +351,5 @@ skip: /* disconnect from server */ if ( res ) ldap_msgfree( res ); - tool_unbind( ld ); - tool_destroy(); - - return code == LDAP_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE; + tool_exit( ld, code == LDAP_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE ); }