Skip to content

Commit

Permalink
* nis/nis_table.c (nis_list): If __follow_path fails in the new
Browse files Browse the repository at this point in the history
	code, make sure the nis_freeresult call doesn't crash and that the
	result is reported correctly.
  • Loading branch information
Ulrich Drepper committed Oct 6, 2006
1 parent 6836157 commit 4df92d5
Show file tree
Hide file tree
Showing 3 changed files with 4,889 additions and 4,358 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2006-10-06 Ulrich Drepper <drepper@redhat.com>

* nis/nis_table.c (nis_list): If __follow_path fails in the new
code, make sure the nis_freeresult call doesn't crash and that the
result is reported correctly.

2006-09-27 Jakub Jelinek <jakub@redhat.com>

* nis/nis_table.c (nis_list): Handle FOLLOW_PATH | ALL_RESULTS
Expand Down
6 changes: 5 additions & 1 deletion nis/nis_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,11 @@ nis_list (const_nis_name name, unsigned int flags,
&bptr);
if (clnt_status != NIS_SUCCESS)
{
NIS_RES_STATUS (res) = clnt_status;
/* Prepare for the nis_freeresult call. */
memset (res, '\0', sizeof (*res));

if (clnt_status == NIS_NOMEMORY)
NIS_RES_STATUS (allres) = clnt_status;
++done;
}
}
Expand Down
Loading

0 comments on commit 4df92d5

Please sign in to comment.