summary refs log tree commit diff
path: root/nis/nis_call.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_call.c')
-rw-r--r--nis/nis_call.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nis/nis_call.c b/nis/nis_call.c
index 8e0aca20ce..affae099cf 100644
--- a/nis/nis_call.c
+++ b/nis/nis_call.c
@@ -581,7 +581,10 @@ __do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs,
 
       dir = rec_dirsearch (name, dir, flags, &status);
       if (dir == NULL)
-	return status;
+	{
+	  __set_errno (saved_errno);
+	  return status;
+	}
     }
 
   if (flags & MASTER_ONLY)
@@ -601,5 +604,7 @@ __do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs,
 
   nis_free_directory (dir);
 
+  __set_errno (saved_errno);
+
   return retcode;
 }