Replace cli_rpc_pipe_close by a talloc destructor on rpc_pipe_struct
[kai/samba.git] / source / client / client.c
index 276ffb93d8c9ce34c610f852efb009d1c3ff733a..b4e1985a837b3a14eb1fed04106ff8469c4102d0 100644 (file)
@@ -3650,7 +3650,7 @@ static bool browse_host_rpc(bool sort)
        info_ctr.ctr.ctr1 = &ctr1;
 
        status = rpccli_srvsvc_NetShareEnumAll(pipe_hnd, frame,
-                                             pipe_hnd->cli->desthost,
+                                             pipe_hnd->desthost,
                                              &info_ctr,
                                              0xffffffff,
                                              &total_entries,
@@ -3658,7 +3658,7 @@ static bool browse_host_rpc(bool sort)
                                              &werr);
 
        if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(werr)) {
-               cli_rpc_pipe_close(pipe_hnd);
+               TALLOC_FREE(pipe_hnd);
                TALLOC_FREE(frame);
                return false;
        }
@@ -3668,7 +3668,7 @@ static bool browse_host_rpc(bool sort)
                browse_fn(info.name, info.type, info.comment, NULL);
        }
 
-       cli_rpc_pipe_close(pipe_hnd);
+       TALLOC_FREE(pipe_hnd);
        TALLOC_FREE(frame);
        return true;
 }