summaryrefslogtreecommitdiff
path: root/source4/ntvfs/ipc/vfs_ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/ipc/vfs_ipc.c')
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 20b70415aa..70dd3e3561 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -610,14 +610,13 @@ static NTSTATUS ipc_qfileinfo(struct ntvfs_module_context *ntvfs,
struct ntvfs_request *req, union smb_fileinfo *info)
{
struct ipc_private *private = ntvfs->private_data;
+ struct pipe_state *p = pipe_state_find(private, info->generic.in.file.ntvfs);
+ if (!p) {
+ return NT_STATUS_INVALID_HANDLE;
+ }
switch (info->generic.level) {
case RAW_FILEINFO_GENERIC:
{
- struct pipe_state *p;
- p = pipe_state_find(private, info->generic.in.file.ntvfs);
- if (!p) {
- return NT_STATUS_INVALID_HANDLE;
- }
ZERO_STRUCT(info->generic.out);
info->generic.out.attrib = FILE_ATTRIBUTE_NORMAL;
info->generic.out.fname.s = strrchr(p->pipe_name, '\\');