about summary refs log tree commit diff
path: root/src/passwd/getgr_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/passwd/getgr_r.c')
-rw-r--r--src/passwd/getgr_r.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/passwd/getgr_r.c b/src/passwd/getgr_r.c
index 7246e8a4..f3e8f603 100644
--- a/src/passwd/getgr_r.c
+++ b/src/passwd/getgr_r.c
@@ -34,6 +34,7 @@ static int getgr_r(const char *name, gid_t gid, struct group *gr, char *buf, siz
  	free(mem);
  	free(line);
 	pthread_setcancelstate(cs, 0);
+	if (rv) errno = rv;
 	return rv;
 }