From 5240b10eaa1f19dcf2dbc31e5e1f8868716bbc69 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 15 Jul 2009 19:17:57 +0200 Subject: 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 --- source4/ntvfs/posix/pvfs_resolve.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/posix') 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; -- cgit