The branch, master has been updated
       via  26809d1 smbd: Fix a small leak on talloc_tos()
       via  7dceb3a smbd: Fix an uninitialized variable read
       via  6c76c5e smbd: Make talloc_report of smb_filename more readable
      from  15511f7 vfs_unityed_media: VFS module for sharing AVID projects

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


- Log -----------------------------------------------------------------
commit 26809d17f4a65334a40c219a9a29ed1ea1d4380b
Author: Volker Lendecke <[email protected]>
Date:   Fri Jan 9 15:47:18 2015 +0100

    smbd: Fix a small leak on talloc_tos()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>
    
    Autobuild-User(master): Ralph Böhme <[email protected]>
    Autobuild-Date(master): Sun Jan 11 20:34:56 CET 2015 on sn-devel-104

commit 7dceb3a2df49101cd940f7cd1b2798c81dd4e9d9
Author: Volker Lendecke <[email protected]>
Date:   Fri Jan 9 15:45:41 2015 +0100

    smbd: Fix an uninitialized variable read
    
    If dbwrap_fetch_locked failed, we did a TALLOC_FREE(value). Fix this with a
    talloc hierarchy.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 6c76c5ef93cd51d0c19faa78cecdc49a3ff5fd03
Author: Volker Lendecke <[email protected]>
Date:   Fri Jan 9 15:38:19 2015 +0100

    smbd: Make talloc_report of smb_filename more readable
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

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

Summary of changes:
 source3/lib/filename_util.c | 6 ++++++
 source3/locking/leases_db.c | 5 ++---
 2 files changed, 8 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/filename_util.c b/source3/lib/filename_util.c
index 3ebf311..316360b 100644
--- a/source3/lib/filename_util.c
+++ b/source3/lib/filename_util.c
@@ -199,14 +199,20 @@ struct smb_filename *cp_smb_filename(TALLOC_CTX *mem_ctx,
        if (in->base_name != NULL) {
                out->base_name = talloc_memdup(
                                out, in->base_name, base_len);
+               talloc_set_name_const(out->base_name,
+                                     out->base_name);
        }
        if (in->stream_name != NULL) {
                out->stream_name = talloc_memdup(
                                out, in->stream_name, stream_len);
+               talloc_set_name_const(out->stream_name,
+                                     out->stream_name);
        }
        if (in->original_lcomp != NULL) {
                out->original_lcomp = talloc_memdup(
                                out, in->original_lcomp, lcomp_len);
+               talloc_set_name_const(out->original_lcomp,
+                                     out->original_lcomp);
        }
        out->st = in->st;
        return out;
diff --git a/source3/locking/leases_db.c b/source3/locking/leases_db.c
index 0700ba9..2ee6a26 100644
--- a/source3/locking/leases_db.c
+++ b/source3/locking/leases_db.c
@@ -243,7 +243,7 @@ NTSTATUS leases_db_del(const struct GUID *client_guid,
                goto out;
        }
 
-       value = talloc(talloc_tos(), struct leases_db_value);
+       value = talloc(rec, struct leases_db_value);
        if (value == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto out;
@@ -283,7 +283,7 @@ NTSTATUS leases_db_del(const struct GUID *client_guid,
        } else {
                DEBUG(10, ("%s: updating record\n", __func__));
                ndr_err = ndr_push_struct_blob(
-                       &blob, talloc_tos(), value,
+                       &blob, rec, value,
                        (ndr_push_flags_fn_t)ndr_push_leases_db_value);
                if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                        DEBUG(10, ("%s: ndr_push_struct_blob_failed: %s\n",
@@ -308,7 +308,6 @@ NTSTATUS leases_db_del(const struct GUID *client_guid,
 
   out:
 
-       TALLOC_FREE(value);
        TALLOC_FREE(rec);
        return status;
 }


-- 
Samba Shared Repository

Reply via email to