aboutsummaryrefslogtreecommitdiff
path: root/nis
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-10-06 20:34:24 +0000
committerUlrich Drepper <drepper@redhat.com>2006-10-06 20:34:24 +0000
commit4df92d57e86155e371b7797ed0bb51ff30e6450a (patch)
tree7eb8970020022ccbf96b3eca7372f7fa683ead77 /nis
parent68361572527e50a1e8d21f2898faa3809181c946 (diff)
downloadglibc-4df92d57e86155e371b7797ed0bb51ff30e6450a.zip
glibc-4df92d57e86155e371b7797ed0bb51ff30e6450a.tar.gz
glibc-4df92d57e86155e371b7797ed0bb51ff30e6450a.tar.bz2
* 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.
Diffstat (limited to 'nis')
-rw-r--r--nis/nis_table.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nis/nis_table.c b/nis/nis_table.c
index f898e3c..cb25be6 100644
--- a/nis/nis_table.c
+++ b/nis/nis_table.c
@@ -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;
}
}