From d4b661e5757ca4059d875173ae70328fb31f1595 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 May 2006 22:25:23 +0000 Subject: * nis/nss_nis/nis-grp.c (internal_nis_getgrent_r): Don't try to free outkey in error case when batch_read is set [Coverity CID 196]. --- nis/nss_nis/nis-grp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nis/nss_nis') 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; } -- cgit v1.2.3