summaryrefslogtreecommitdiff
path: root/source/rpc_client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-02-28 00:51:02 +0000
committerJeremy Allison <jra@samba.org>2001-02-28 00:51:02 +0000
commit14d5997dc841e78a619e865288486d50c245896d (patch)
tree0708f5624f6390d84f1f3e5d0109783811664152 /source/rpc_client
parent2d3429cfe2d19b667400e408a4947efd160d99c0 (diff)
downloadsamba-14d5997dc841e78a619e865288486d50c245896d.tar.gz
Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree. Jeremy.
Diffstat (limited to 'source/rpc_client')
-rw-r--r--source/rpc_client/cli_reg.c9
-rw-r--r--source/rpc_client/cli_spoolss.c2
2 files changed, 2 insertions, 9 deletions
diff --git a/source/rpc_client/cli_reg.c b/source/rpc_client/cli_reg.c
index b45ac0d033a..96e27c5ce66 100644
--- a/source/rpc_client/cli_reg.c
+++ b/source/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/source/rpc_client/cli_spoolss.c b/source/rpc_client/cli_spoolss.c
index 3517fbbc9c8..461bddefaf8 100644
--- a/source/rpc_client/cli_spoolss.c
+++ b/source/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);