From 1e528c6e1bd9d6c7d952456eab826362f489dfbd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 1 May 2006 22:33:24 +0000 Subject: * nis/nss_nis/nis-pwd.c (internal_nis_getpwent_r): Don't try to free outkey in error case when batch_read is set. --- nis/nss_nis/nis-pwd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nis') diff --git a/nis/nss_nis/nis-pwd.c b/nis/nss_nis/nis-pwd.c index 7972118..1b5206a 100644 --- a/nis/nss_nis/nis-pwd.c +++ b/nis/nss_nis/nis-pwd.c @@ -333,7 +333,8 @@ internal_nis_getpwent_r (struct passwd *pwd, 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.1