about summary refs log tree commit diff
path: root/sunrpc/key_call.c
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc/key_call.c')
-rw-r--r--sunrpc/key_call.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
index 5aef933cbf..2f4ca25d94 100644
--- a/sunrpc/key_call.c
+++ b/sunrpc/key_call.c
@@ -491,7 +491,7 @@ key_call_door (u_long proc, xdrproc_t xdr_arg, char *arg,
 	       xdrproc_t xdr_rslt, char *rslt)
 {
   XDR xdrs;
-  int fd;
+  int fd, ret;
   door_arg_t args;
   char *data_ptr;
   u_long data_len = 0;
@@ -525,12 +525,13 @@ key_call_door (u_long proc, xdrproc_t xdr_arg, char *arg,
   args.rbuf = res;
   args.rsize = sizeof (res);
 
-  if (__door_call (fd, &args) < 0)
-    return 0;
-
+  ret = __door_call (fd, &args);
   free (data_ptr);
   close (fd);
 
+  if (ret < 0)
+    return 0;
+
   memcpy (&data_len, args.data_ptr, sizeof (u_long));
   if (data_len != 0)
     return 0;