diff options
author | Günther Deschner <gd@samba.org> | 2008-01-04 11:21:53 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-01-04 11:55:00 +0100 |
commit | 8dc1bf89a7ab78eb88a796e8d09e563b4d7d9649 (patch) | |
tree | ef814c4b3ee960d42633fe60a2906350aa0d268a /source3 | |
parent | b076a7e802a89bdc5b369e98c7d69d8f970d8265 (diff) | |
download | samba-8dc1bf89a7ab78eb88a796e8d09e563b4d7d9649.tar.gz samba-8dc1bf89a7ab78eb88a796e8d09e563b4d7d9649.tar.bz2 samba-8dc1bf89a7ab78eb88a796e8d09e563b4d7d9649.zip |
Robustness fix for libnet join when unjoining.
Guenther
(This used to be commit d7f01d940feb7dfedb6c4b8b88f5443434e03428)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libnet/libnet_join.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index c289ad33e5..70777df247 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -319,10 +319,11 @@ static NTSTATUS do_DomainUnjoin(TALLOC_CTX *mem_ctx, } done: - rpccli_samr_close(pipe_hnd, mem_ctx, &domain_pol); - rpccli_samr_close(pipe_hnd, mem_ctx, &sam_pol); - - cli_rpc_pipe_close(pipe_hnd); + if (pipe_hnd) { + rpccli_samr_close(pipe_hnd, mem_ctx, &domain_pol); + rpccli_samr_close(pipe_hnd, mem_ctx, &sam_pol); + cli_rpc_pipe_close(pipe_hnd); + } if (cli) { cli_shutdown(cli); |