summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_dirlist.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-22 08:17:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:59 -0500
commitdd7862cb6aaef40b848eb96fb4020c492a313ec8 (patch)
treee5e3518079c3dfe6a10bcd43413c4f69a3d29dae /source4/ntvfs/posix/pvfs_dirlist.c
parentc9d96e9c44eefb6107bf4632ae7a5f43035a957d (diff)
downloadsamba-dd7862cb6aaef40b848eb96fb4020c492a313ec8.tar.gz
samba-dd7862cb6aaef40b848eb96fb4020c492a313ec8.tar.bz2
samba-dd7862cb6aaef40b848eb96fb4020c492a313ec8.zip
r2503: the RAW-SEARCH test now mostly passes against the posix backend
(This used to be commit 9710f24b1fd103d5656c9585cdfed96449cf9f97)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_dirlist.c')
-rw-r--r--source4/ntvfs/posix/pvfs_dirlist.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_dirlist.c b/source4/ntvfs/posix/pvfs_dirlist.c
index 1b4d01c197..0137424dc4 100644
--- a/source4/ntvfs/posix/pvfs_dirlist.c
+++ b/source4/ntvfs/posix/pvfs_dirlist.c
@@ -36,7 +36,10 @@ static NTSTATUS pvfs_list_no_wildcard(struct pvfs_state *pvfs, struct pvfs_filen
}
dir->count = 0;
- dir->unix_path = name->full_name;
+ dir->unix_path = talloc_strdup(dir, name->full_name);
+ if (!dir->unix_path) {
+ return NT_STATUS_NO_MEMORY;
+ }
dir->names = talloc_array_p(dir, const char *, 1);
if (!dir->names) {
@@ -81,7 +84,11 @@ NTSTATUS pvfs_list(struct pvfs_state *pvfs, struct pvfs_filename *name, struct p
}
dir->count = 0;
- dir->unix_path = name->full_name;
+ dir->unix_path = talloc_strdup(dir, name->full_name);
+ if (!dir->unix_path) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
dir->names = talloc(dir, 0);
if (!dir->names) {
return NT_STATUS_NO_MEMORY;