From a4243b3d9996738ff575d08fbdff5e3a3ba8adb3 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 26 Jul 2000 03:04:01 +0000 Subject: Fixed memory leak in modify_trust_password() (This used to be commit 7145689bf55b9f3100632badac486fde30ee4972) --- source3/rpc_client/cli_netlogon.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/rpc_client') diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index 065bd57649..6437685ed8 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -513,24 +513,28 @@ static BOOL modify_trust_password( char *domain, char *remote_machine, if(!resolve_name( remote_machine, &cli.dest_ip, 0x20)) { DEBUG(0,("modify_trust_password: Can't resolve address for %s\n", remote_machine)); + cli_shutdown(&cli); return False; } if (ismyip(cli.dest_ip)) { DEBUG(0,("modify_trust_password: Machine %s is one of our addresses. Cannot add \ to ourselves.\n", remote_machine)); + cli_shutdown(&cli); return False; } if (!cli_connect(&cli, remote_machine, &cli.dest_ip)) { DEBUG(0,("modify_trust_password: unable to connect to SMB server on \ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) )); + cli_shutdown(&cli); return False; } if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) { DEBUG(0,("modify_trust_password: machine %s rejected the NetBIOS \ session request. Error was %s\n", remote_machine, cli_errstr(&cli) )); + cli_shutdown(&cli); return False; } -- cgit