* 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].
This commit is contained in:
Ulrich Drepper 2006-05-01 22:25:23 +00:00
parent 96c169f22e
commit d4b661e575
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2006-05-01 Ulrich Drepper <drepper@redhat.com> 2006-05-01 Ulrich Drepper <drepper@redhat.com>
* 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].
[BZ #2517] [BZ #2517]
* misc/sys/queue.h: Update to more recent version. * misc/sys/queue.h: Update to more recent version.

View File

@ -220,7 +220,8 @@ internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen,
errnop); errnop);
if (__builtin_expect (parse_res == -1, 0)) if (__builtin_expect (parse_res == -1, 0))
{ {
free (outkey); if (!batch_read)
free (outkey);
*errnop = ERANGE; *errnop = ERANGE;
return NSS_STATUS_TRYAGAIN; return NSS_STATUS_TRYAGAIN;
} }