summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-09-22 18:49:23 +0000
committerGerald Carter <jerry@samba.org>2005-09-22 18:49:23 +0000
commita1a044d2ea2f5c33a2acf6b346972ac9b8631ed4 (patch)
tree271311c48bef02ce1958e579eb56073e59390b61
parentd96bd9fa6e3f85c4766ce2899a4594f6bbad1763 (diff)
downloadsamba-a1a044d2ea2f5c33a2acf6b346972ac9b8631ed4.tar.gz
samba-a1a044d2ea2f5c33a2acf6b346972ac9b8631ed4.tar.xz
samba-a1a044d2ea2f5c33a2acf6b346972ac9b8631ed4.zip
r10431: fix segfault when the pip open fails in 'net rpc' commands
-rw-r--r--source/utils/net_rpc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c
index ac7e5663441..e80e8e6f5c0 100644
--- a/source/utils/net_rpc.c
+++ b/source/utils/net_rpc.c
@@ -131,6 +131,8 @@ int run_rpc_command(struct cli_state *cli_arg, const int pipe_idx, int conn_flag
if (!(conn_flags & NET_FLAGS_NO_PIPE)) {
if (!cli_nt_session_open(cli, pipe_idx)) {
DEBUG(0, ("Could not initialise pipe\n"));
+ cli_shutdown(cli);
+ return -1;
}
}