From 4e344aba4e66e2e4f59f407f305072bfbb82dc7d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 22 Nov 2013 16:17:44 +0000 Subject: smbd: Point reply_open at the correct stat struct Not sure if anybody will ever notice this these days, but the same is done in the createfile calls. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/reply.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index ffbfabbca5..c11c318ef9 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1960,6 +1960,10 @@ void reply_open(struct smb_request *req) goto out; } + /* Ensure we're pointing at the correct stat struct. */ + TALLOC_FREE(smb_fname); + smb_fname = fsp->fsp_name; + size = smb_fname->st.st_ex_size; fattr = dos_mode(conn, smb_fname); @@ -2007,7 +2011,6 @@ void reply_open(struct smb_request *req) CVAL(req->outbuf,smb_flg)|CORE_OPLOCK_GRANTED); } out: - TALLOC_FREE(smb_fname); END_PROFILE(SMBopen); return; } -- cgit