diff options
author | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2008-01-15 13:58:47 +0000 |
---|---|---|
committer | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2008-01-15 13:58:47 +0000 |
commit | 9788383a6c08189564cd18a824aab4ccdbe57a21 (patch) | |
tree | e93ab7b1007d79e951f69a1495ac7e474536eb25 /source3/printing/nt_printing.c | |
parent | 011e89c85868ec8f16e475a560a0e5bd41995920 (diff) | |
parent | 97f61b542c0e6b1f25ed08fa36792fd90a981e0e (diff) | |
download | samba-9788383a6c08189564cd18a824aab4ccdbe57a21.tar.gz samba-9788383a6c08189564cd18a824aab4ccdbe57a21.tar.bz2 samba-9788383a6c08189564cd18a824aab4ccdbe57a21.zip |
Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit 3a61e663e51fe620225691bc8673bf8800a36f47)
Diffstat (limited to 'source3/printing/nt_printing.c')
-rw-r--r-- | source3/printing/nt_printing.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 1a4a26ee6f..bba55c0e4a 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -5326,6 +5326,7 @@ WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr) SEC_DESC_BUF *new_secdesc_ctr = NULL; SEC_DESC_BUF *old_secdesc_ctr = NULL; prs_struct ps; + bool prs_init_done = false; TALLOC_CTX *mem_ctx = NULL; TDB_DATA kbuf; WERROR status; @@ -5394,6 +5395,8 @@ WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr) (uint32)ndr_size_security_descriptor(new_secdesc_ctr->sd, 0) + sizeof(SEC_DESC_BUF), mem_ctx, MARSHALL); + prs_init_done = true; + if (!sec_io_desc_buf("nt_printing_setsec", &new_secdesc_ctr, &ps, 1)) { status = WERR_BADFUNC; @@ -5413,7 +5416,9 @@ WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr) out: - prs_mem_free(&ps); + if (prs_init_done) { + prs_mem_free(&ps); + } if (mem_ctx) talloc_destroy(mem_ctx); return status; |