diff options
author | Jeremy Allison <jra@samba.org> | 2001-02-28 00:51:02 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-02-28 00:51:02 +0000 |
commit | 0f2799aaf1e33aa474a12b9389728d57af926cb3 (patch) | |
tree | e2cf9efcc996a3b8f08184e204e8af0810e7b8c9 /source3/rpc_client | |
parent | 545649a05f4d634bb93471bd946a92b1c5644684 (diff) | |
download | samba-0f2799aaf1e33aa474a12b9389728d57af926cb3.tar.gz samba-0f2799aaf1e33aa474a12b9389728d57af926cb3.tar.bz2 samba-0f2799aaf1e33aa474a12b9389728d57af926cb3.zip |
Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree.
Jeremy.
(This used to be commit 14d5997dc841e78a619e865288486d50c245896d)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_reg.c | 9 | ||||
-rw-r--r-- | source3/rpc_client/cli_spoolss.c | 2 |
2 files changed, 2 insertions, 9 deletions
diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c index b45ac0d033..96e27c5ce6 100644 --- a/source3/rpc_client/cli_reg.c +++ b/source3/rpc_client/cli_reg.c @@ -708,19 +708,17 @@ BOOL do_reg_create_key(struct cli_state *cli, POLICY_HND *hnd, DEBUG(4,("REG Create Key: %s %s 0x%08x\n", key_name, key_class, sam_access != NULL ? sam_access->mask : 0)); - if((sec = make_sec_desc( 1, NULL, NULL, NULL, NULL, &sec_len)) == NULL) { + if((sec = make_sec_desc( cli->mem_ctx, 1, NULL, NULL, NULL, NULL, &sec_len)) == NULL) { DEBUG(0,("make_sec_desc : malloc fail.\n")); return False; } DEBUG(10,("make_sec_desc: len = %d\n", (int)sec_len)); - if((sec_buf = make_sec_desc_buf( (int)sec_len, sec)) == NULL) { + if((sec_buf = make_sec_desc_buf( cli->mem_ctx, (int)sec_len, sec)) == NULL) { DEBUG(0,("make_sec_desc : malloc fail (1)\n")); - free_sec_desc(&sec); return False; } - free_sec_desc(&sec); prs_init(&buf, MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, MARSHALL); prs_init(&rbuf, 0, 4, cli->mem_ctx, UNMARSHALL); @@ -729,7 +727,6 @@ BOOL do_reg_create_key(struct cli_state *cli, POLICY_HND *hnd, /* turn parameters into data stream */ if(!reg_io_q_create_key("", &q_o, &buf, 0)) { - free_sec_desc_buf(&sec_buf); prs_mem_free(&buf); prs_mem_free(&rbuf); return False; @@ -737,13 +734,11 @@ BOOL do_reg_create_key(struct cli_state *cli, POLICY_HND *hnd, /* send the data on \PIPE\ */ if (rpc_api_pipe_req(cli, REG_CREATE_KEY, &buf, &rbuf)) { - free_sec_desc_buf(&sec_buf); prs_mem_free(&buf); prs_mem_free(&rbuf); return False; } - free_sec_desc_buf(&sec_buf); prs_mem_free(&buf); ZERO_STRUCT(r_o); diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 3517fbbc9c..461bddefaf 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -584,7 +584,6 @@ BOOL spoolss_addprinterex(POLICY_HND *hnd, const char* srv_name, PRINTER_INFO_2 prs_mem_free(&rbuf); prs_mem_free(&buf ); - free_spoolss_q_addprinterex(&q_o); if (mem_ctx) talloc_destroy(mem_ctx); @@ -813,7 +812,6 @@ uint32 spoolss_addprinterdriver(const char *srv_name, uint32 level, PRINTER_DRIV prs_mem_free(&rbuf); prs_mem_free(&buf ); - free_spool_driver_info_3(q_o.info.info_3); if (mem_ctx) talloc_destroy(mem_ctx); |