diff options
Diffstat (limited to 'databases')
-rw-r--r-- | databases/nss_ldap/files/netbsd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/databases/nss_ldap/files/netbsd.c b/databases/nss_ldap/files/netbsd.c index 06792f312e3..3568fb6e67c 100644 --- a/databases/nss_ldap/files/netbsd.c +++ b/databases/nss_ldap/files/netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd.c,v 1.3 2005/08/30 16:12:02 drochner Exp $ */ +/* $NetBSD: netbsd.c,v 1.4 2005/09/19 15:54:42 drochner Exp $ */ #include <sys/param.h> #include <pwd.h> @@ -453,6 +453,7 @@ netbsd_getgroupmembership(void *rv, void *cb_data, va_list ap) int *size = va_arg(ap, int*); gid_t *tmpgroups; long int lstart, lsize; + int origsize = *size; tmpgroups = malloc(limit * sizeof(gid_t)); if (!tmpgroups) @@ -476,7 +477,8 @@ netbsd_getgroupmembership(void *rv, void *cb_data, va_list ap) } *size = lstart; s = NSS_STATUS_NOTFOUND; - } + } else + *size = origsize; free(tmpgroups); return nss2netbsderr[s]; |