diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-07-15 19:17:57 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-07-15 19:24:35 +0200 |
commit | 5240b10eaa1f19dcf2dbc31e5e1f8868716bbc69 (patch) | |
tree | 433a096029875bfb14e6192891e0fcdffbcf5c23 /source4/ntvfs | |
parent | 382d5c8f5bb3b54e7c1a2daaf9d0283b6275768a (diff) | |
download | samba-5240b10eaa1f19dcf2dbc31e5e1f8868716bbc69.tar.gz samba-5240b10eaa1f19dcf2dbc31e5e1f8868716bbc69.tar.bz2 samba-5240b10eaa1f19dcf2dbc31e5e1f8868716bbc69.zip |
s3:ntvfs/posix: avoid unnesessary talloc_reference()
This caused the panics on the RAW-SETFILEINFO.RENAME test,
because we returned an empty strings.
The problem was:
ERROR: talloc_steal with references at ntvfs/posix/pvfs_setfileinfo.c:215
reference at ntvfs/posix/pvfs_resolve.c:799
metze
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_resolve.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c index c33323350e..8e8da72e1f 100644 --- a/source4/ntvfs/posix/pvfs_resolve.c +++ b/source4/ntvfs/posix/pvfs_resolve.c @@ -796,7 +796,10 @@ NTSTATUS pvfs_resolve_parent(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, (*name)->has_wildcard = false; /* we can't get the correct 'original_name', but for the purposes of this call this is close enough */ - (*name)->original_name = talloc_reference(*name, child->original_name); + (*name)->original_name = talloc_strdup(*name, child->original_name); + if ((*name)->original_name == NULL) { + return NT_STATUS_NO_MEMORY; + } (*name)->stream_name = NULL; (*name)->stream_id = 0; |