Skip to content

Commit

Permalink
* nis/nss_nis/nis-grp.c (internal_nis_getgrent_r): Don't try to
Browse files Browse the repository at this point in the history
	free outkey in error case when batch_read is set [Coverity CID 196].
  • Loading branch information
Ulrich Drepper committed May 1, 2006
1 parent 96c169f commit d4b661e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
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]
* misc/sys/queue.h: Update to more recent version.

Expand Down
3 changes: 2 additions & 1 deletion nis/nss_nis/nis-grp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d4b661e

Please sign in to comment.