The branch, master has been updated
       via  e9569ae9250ac571c63fbb450709778a247e9ca3 (commit)
       via  5fc9ca93f3f7f00198478b333d8e4ee036165121 (commit)
       via  ea6094d2cbb6d96baa5db0a1cb3fdbc7f58d73e2 (commit)
      from  2ff80f0d761680f3732a46c2672bcef041a7c367 (commit)

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


- Log -----------------------------------------------------------------
commit e9569ae9250ac571c63fbb450709778a247e9ca3
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Apr 9 15:51:35 2009 +0200

    Fix some nonempty blank lines

commit 5fc9ca93f3f7f00198478b333d8e4ee036165121
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Apr 9 11:40:08 2009 +0200

    Fix a memleak in an unlikely error path in change_notify_create()

commit ea6094d2cbb6d96baa5db0a1cb3fdbc7f58d73e2
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Apr 9 11:36:45 2009 +0200

    Use talloc_tos() for a temp convert_string_allocate()

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

Summary of changes:
 source3/smbd/notify.c          |    7 ++++---
 source3/smbd/notify_internal.c |    8 ++++----
 2 files changed, 8 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index fdab2ca..a17afc7 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -81,7 +81,7 @@ static bool notify_marshall_changes(int num_changes,
 
                c = &changes[i];
 
-               if (!convert_string_allocate(NULL, CH_UNIX, CH_UTF16LE,
+               if (!convert_string_allocate(talloc_tos(), CH_UNIX, CH_UTF16LE,
                        c->name, strlen(c->name)+1, &uni_name.buffer,
                        &namelen, True) || (uni_name.buffer == NULL)) {
                        goto fail;
@@ -109,7 +109,7 @@ static bool notify_marshall_changes(int num_changes,
                 */
                prs_set_offset(ps, prs_offset(ps)-2);
 
-               SAFE_FREE(uni_name.buffer);
+               TALLOC_FREE(uni_name.buffer);
 
                if (prs_offset(ps) > max_offset) {
                        /* Too much data for client. */
@@ -123,7 +123,7 @@ static bool notify_marshall_changes(int num_changes,
        return True;
 
  fail:
-       SAFE_FREE(uni_name.buffer);
+       TALLOC_FREE(uni_name.buffer);
        return False;
 }
 
@@ -211,6 +211,7 @@ NTSTATUS change_notify_create(struct files_struct *fsp, 
uint32 filter,
        if (asprintf(&fullpath, "%s/%s", fsp->conn->connectpath,
                     fsp->fsp_name) == -1) {
                DEBUG(0, ("asprintf failed\n"));
+               TALLOC_FREE(fsp->notify);
                return NT_STATUS_NO_MEMORY;
        }
 
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index 06da717..1e45c54 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -2,17 +2,17 @@
    Unix SMB/CIFS implementation.
 
    Copyright (C) Andrew Tridgell 2006
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -614,7 +614,7 @@ void notify_trigger(struct notify_context *notify,
 
                /* see if there are any entries at this depth */
                if (d->num_entries == 0) continue;
-               
+
                /* try to skip based on the maximum mask. If next_p is
                 NULL then we know it will be a 'this directory'
                 match, otherwise it must be a subdir match */


-- 
Samba Shared Repository

Reply via email to