Replace cli_rpc_pipe_close by a talloc destructor on rpc_pipe_struct
[kai/samba.git] / source / utils / smbtree.c
index d2dd1b49d32ac6d192d4a043c8c31bb4e85479ee..c2b364d1e9ac80250dbb3d60ab97bbf36f361933 100644 (file)
@@ -188,7 +188,7 @@ static bool get_rpc_shares(struct cli_state *cli,
 
        if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(werr)) {
                TALLOC_FREE(mem_ctx);
-               cli_rpc_pipe_close(pipe_hnd);
+               TALLOC_FREE(pipe_hnd);
                return False;
        }
 
@@ -198,7 +198,7 @@ static bool get_rpc_shares(struct cli_state *cli,
        }
 
        TALLOC_FREE(mem_ctx);
-       cli_rpc_pipe_close(pipe_hnd);
+       TALLOC_FREE(pipe_hnd);
        return True;
 }