The branch, master has been updated
       via  22021dbfa7a s3/printing: Fix leaking parsed options
       via  5ba76344ef8 s3/printing: Fix leaked mem ctx returned from talloc_new
      from  788af2540eb WHATSNEW document JSON audit logging changes

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 22021dbfa7a94007a511d05f25e49ab73dacbcf5
Author: Noel Power <[email protected]>
Date:   Thu Jan 29 15:12:52 2026 +0000

    s3/printing: Fix leaking parsed options
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15979
    Signed-off-by: Noel Power <[email protected]>
    Reviewed-by: Gary Lockyer <[email protected]>
    
    Autobuild-User(master): Noel Power <[email protected]>
    Autobuild-Date(master): Fri Jan 30 11:09:44 UTC 2026 on atb-devel-224

commit 5ba76344ef807577ea1fd4265d585285eb633971
Author: Noel Power <[email protected]>
Date:   Thu Jan 29 11:00:26 2026 +0000

    s3/printing: Fix leaked mem ctx returned from talloc_new
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15979
    Signed-off-by: Noel Power <[email protected]>
    Reviewed-by: Gary Lockyer <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 source3/printing/print_cups.c | 3 +++
 source3/printing/printing.c   | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index d8ba9ccd011..f1449e1d1ea 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -1130,6 +1130,9 @@ static int cups_job_submit(int snum, struct printjob 
*pjob,
        if (http)
                httpClose(http);
 
+       if (num_options) {
+               cupsFreeOptions(num_options, options);
+       }
        TALLOC_FREE(frame);
 
        return ret;
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index bcfd893456b..3afc3733983 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2900,7 +2900,7 @@ NTSTATUS print_job_end(struct messaging_context *msg_ctx, 
int snum,
                        pjob->filename, pjob->size ? "deleted" : "zero length" 
));
                unlink(pjob->filename);
                pjob_delete(global_event_context(), msg_ctx, sharename, jobid);
-               return NT_STATUS_OK;
+               goto out;
        }
 
        /* don't strip out characters like '$' from the printername */
@@ -2942,7 +2942,8 @@ NTSTATUS print_job_end(struct messaging_context *msg_ctx, 
int snum,
        /* make sure the database is up to date */
        if (print_cache_expired(lp_const_servicename(snum), True))
                print_queue_update(msg_ctx, snum, False);
-
+out:
+       talloc_free(tmp_ctx);
        return NT_STATUS_OK;
 
 fail:


-- 
Samba Shared Repository

Reply via email to