diff options
author | Volker Lendecke <vl@samba.org> | 2008-04-19 18:17:13 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-04-20 00:12:52 +0200 |
commit | b46d340fd5d7e88684ac77000e17c1899ff608b2 (patch) | |
tree | d234eb0582e41f91dc7c200c98c0752927c707e0 /source3/libsmb | |
parent | fb73de3b927e02fbc056565714ecbe83c7645dc2 (diff) | |
download | samba-b46d340fd5d7e88684ac77000e17c1899ff608b2.tar.gz samba-b46d340fd5d7e88684ac77000e17c1899ff608b2.tar.bz2 samba-b46d340fd5d7e88684ac77000e17c1899ff608b2.zip |
Refactoring: Make struct rpc_pipe_client its own talloc parent
(This used to be commit a6d74a5a562b54f0b36934965f545fdeb1e8b34a)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clientgen.c | 2 | ||||
-rw-r--r-- | source3/libsmb/passchange.c | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 64191239d3..860cb948ac 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -650,7 +650,7 @@ bool cli_rpc_pipe_close(struct rpc_pipe_client *cli) cli->pipe_name, cli->cli->desthost )); DLIST_REMOVE(cli->cli->pipe_list, cli); - talloc_destroy(cli->mem_ctx); + talloc_destroy(cli); return ret; } diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c index 468750f801..2f9a87dee4 100644 --- a/source3/libsmb/passchange.c +++ b/source3/libsmb/passchange.c @@ -177,8 +177,9 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam } } - if (NT_STATUS_IS_OK(result = rpccli_samr_chgpasswd_user(pipe_hnd, pipe_hnd->mem_ctx, user_name, - new_passwd, old_passwd))) { + result = rpccli_samr_chgpasswd_user(pipe_hnd, talloc_tos(), + user_name, new_passwd, old_passwd); + if (NT_STATUS_IS_OK(result)) { /* Great - it all worked! */ cli_shutdown(cli); return NT_STATUS_OK; @@ -206,11 +207,9 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam pipe_hnd = cli_rpc_pipe_open_noauth(cli, PI_SAMR, &result); if ( pipe_hnd && - (NT_STATUS_IS_OK(result = rpccli_samr_chgpasswd_user(pipe_hnd, - pipe_hnd->mem_ctx, - user_name, - new_passwd, - old_passwd)))) { + (NT_STATUS_IS_OK(result = rpccli_samr_chgpasswd_user( + pipe_hnd, talloc_tos(), user_name, + new_passwd, old_passwd)))) { /* Great - it all worked! */ cli_shutdown(cli); return NT_STATUS_OK; |