diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-10-06 20:34:24 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-10-06 20:34:24 +0000 |
commit | 4df92d57e86155e371b7797ed0bb51ff30e6450a (patch) | |
tree | 7eb8970020022ccbf96b3eca7372f7fa683ead77 /nis | |
parent | 68361572527e50a1e8d21f2898faa3809181c946 (diff) | |
download | glibc-4df92d57e86155e371b7797ed0bb51ff30e6450a.tar.gz glibc-4df92d57e86155e371b7797ed0bb51ff30e6450a.tar.xz glibc-4df92d57e86155e371b7797ed0bb51ff30e6450a.zip |
* 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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nis/nis_table.c b/nis/nis_table.c index f898e3c66c..cb25be61e2 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; } } |