summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index bab4913e9a..79644a4da1 100644
--- a/nscd/nscd_helper.c
+++ b/nscd/nscd_helper.c
@@ -269,13 +269,13 @@ get_mapping (request_type type, const char *key,
 			!= keylen, 0))
     goto out_close2;
 
-  mapfd = *(int *) CMSG_DATA (cmsg);
-
   if (__builtin_expect (CMSG_FIRSTHDR (&msg) == NULL
 			|| (CMSG_FIRSTHDR (&msg)->cmsg_len
 			    != CMSG_LEN (sizeof (int))), 0))
     goto out_close2;
 
+  mapfd = *(int *) CMSG_DATA (cmsg);
+
   struct stat64 st;
   if (__builtin_expect (strcmp (resdata, key) != 0, 0)
       || __builtin_expect (fstat64 (mapfd, &st) != 0, 0)