Avoid dup'ing file descriptors when not necessary.
Do not send fd to the client if ops->get_fd() fails.

diff --git a/server/pipe.c b/server/pipe.c
index 7838c12..47dfb61 100644
--- a/server/pipe.c
+++ b/server/pipe.c
@@ -122,7 +122,7 @@
         set_error( STATUS_PIPE_BROKEN );
         return -1;
     }
-    return dup( pipe->obj.fd );
+    return pipe->obj.fd;
 }
 
 static int pipe_get_info( struct object *obj, struct get_file_info_request *req )