diff options
author | Tim Potter <tpot@samba.org> | 2000-07-17 05:38:26 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-07-17 05:38:26 +0000 |
commit | 873c0366d95dd747f93613f6519836fc8f0c8feb (patch) | |
tree | b50c8ab34d2ca8c4dbeab612dd36c17e06287e2d /source3 | |
parent | 8453b27983fd91986867a5eed4f5ae5d65ab4bfb (diff) | |
download | samba-873c0366d95dd747f93613f6519836fc8f0c8feb.tar.gz samba-873c0366d95dd747f93613f6519836fc8f0c8feb.tar.bz2 samba-873c0366d95dd747f93613f6519836fc8f0c8feb.zip |
Free security descriptor after access check in update_printer_sec()
(This used to be commit bc5f9c00be5b8c2f6d258f0c95ed3b4fc0201b87)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 75cec8f04c..587b31f535 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -3047,11 +3047,15 @@ static uint32 update_printer_sec(const POLICY_HND *handle, uint32 level, &status)) { DEBUG(3, ("security descriptor change denied by existing " "security descriptor\n")); - free_sec_desc_buf(&old_secdesc_ctr); - return status; + result = status; + goto done; } - return nt_printing_setsec(Printer->dev.printername, secdesc_ctr); + result = nt_printing_setsec(Printer->dev.printername, secdesc_ctr); + + done: + free_sec_desc_buf(&old_secdesc_ctr); + return result; } /******************************************************************** |