From 2464114e839824205ee046e8370b6c39c33ce51a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 May 2006 22:22:09 +0000 Subject: [PATCH] (internal_nis_getgrent_r): Don't try to free outkey in error case when batch_read is set. --- nis/nss_nis/nis-grp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nis/nss_nis/nis-grp.c b/nis/nss_nis/nis-grp.c index ce642c484f..6e36cf828f 100644 --- a/nis/nss_nis/nis-grp.c +++ b/nis/nss_nis/nis-grp.c @@ -220,7 +220,8 @@ internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen, errnop); if (__builtin_expect (parse_res == -1, 0)) { - free (outkey); + if (!batch_read) + free (outkey); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } -- 2.11.4.GIT