summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_getgr_r.c3
-rw-r--r--nscd/nscd_gethst_r.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index 50932668f4..f6b0b5c3b0 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -81,6 +81,9 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
       return -1;
     }
 
+  /* No value found so far.  */
+  *result = NULL;
+
   req.version = NSCD_VERSION;
   req.type = type;
   req.key_len = keylen;
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
index 1089b967d0..438217b1d6 100644
--- a/nscd/nscd_gethst_r.c
+++ b/nscd/nscd_gethst_r.c
@@ -135,6 +135,9 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type,
       return -1;
     }
 
+  /* No value found so far.  */
+  *result = NULL;
+
   req.version = NSCD_VERSION;
   req.type = type;
   req.key_len = keylen;