about summary refs log tree commit diff
path: root/nscd/nscd_getgr_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/nscd_getgr_r.c')
-rw-r--r--nscd/nscd_getgr_r.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index 6739657e48..f133530f9f 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -205,7 +205,12 @@ __nscd_getgr_r (const char *key, request_type type, struct group *resultbuf,
 	      return 1;
 	    }
 	}
+      close (sock);
+      return 0;
+    }
+  else
+    {
+      close (sock);
+      return -1;
     }
-  close (sock);
-  return 0;
 }