diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-12 17:08:04 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-12 21:04:06 +0100 |
commit | ec412b60ea6d6a4e0fd2e03ca9299b4264483c0c (patch) | |
tree | 37bd502a14886239b0c81f36d371935570d19391 /source3/smbd/filename.c | |
parent | 4af27ec877d67afc719bccd350dae33ef8dd62b5 (diff) | |
download | samba-ec412b60ea6d6a4e0fd2e03ca9299b4264483c0c.tar.gz samba-ec412b60ea6d6a4e0fd2e03ca9299b4264483c0c.tar.xz samba-ec412b60ea6d6a4e0fd2e03ca9299b4264483c0c.zip |
Convert OpenDir to talloc, use talloc_tos()
This cuts some mallocs on NtCreate&X
(This used to be commit 8e64107b7846d8f9cce71aabc95b28b7488d01ce)
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r-- | source3/smbd/filename.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 5ae193fb46b..be4960cab81 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -778,7 +778,7 @@ static bool scan_directory(connection_struct *conn, const char *path, } /* open the directory */ - if (!(cur_dir = OpenDir(conn, path, NULL, 0))) { + if (!(cur_dir = OpenDir(talloc_tos(), conn, path, NULL, 0))) { DEBUG(3,("scan dir didn't open dir [%s]\n",path)); TALLOC_FREE(unmangled_name); return(False); @@ -809,7 +809,7 @@ static bool scan_directory(connection_struct *conn, const char *path, /* we've found the file, change it's name and return */ *found_name = talloc_strdup(ctx,dname); TALLOC_FREE(unmangled_name); - CloseDir(cur_dir); + TALLOC_FREE(cur_dir); if (!*found_name) { errno = ENOMEM; return False; @@ -819,7 +819,7 @@ static bool scan_directory(connection_struct *conn, const char *path, } TALLOC_FREE(unmangled_name); - CloseDir(cur_dir); + TALLOC_FREE(cur_dir); errno = ENOENT; return False; } |