Author: jerry
Date: 2005-09-22 18:49:23 +0000 (Thu, 22 Sep 2005)
New Revision: 10431

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10431

Log:
fix segfault when the pip open fails in 'net rpc' commands
Modified:
   branches/SAMBA_3_0/source/utils/net_rpc.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_rpc.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_rpc.c   2005-09-22 18:48:52 UTC (rev 
10430)
+++ branches/SAMBA_3_0/source/utils/net_rpc.c   2005-09-22 18:49:23 UTC (rev 
10431)
@@ -131,6 +131,8 @@
        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;
                }
        }
        

Modified: branches/SAMBA_3_0_RELEASE/source/utils/net_rpc.c
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/utils/net_rpc.c   2005-09-22 18:48:52 UTC 
(rev 10430)
+++ branches/SAMBA_3_0_RELEASE/source/utils/net_rpc.c   2005-09-22 18:49:23 UTC 
(rev 10431)
@@ -131,6 +131,8 @@
        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;
                }
        }
        

Reply via email to