diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-12-28 23:44:30 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-12-28 23:45:40 +0100 |
commit | cd12cc27adc2291caf5a4014eab176a17af4f5d0 (patch) | |
tree | 2000e729742c698e4f3e0fdbc7c0153f92f6deb2 /libfshelp | |
parent | 9f2d27d4f305efae7cbd6f537940dde3581bee74 (diff) | |
download | hurd-cd12cc27adc2291caf5a4014eab176a17af4f5d0.tar.gz hurd-cd12cc27adc2291caf5a4014eab176a17af4f5d0.tar.bz2 hurd-cd12cc27adc2291caf5a4014eab176a17af4f5d0.zip |
libfshelp: Fix errno value leak
When the last translator box contains a port to a died translator, we do
not want to consider this as a whole failure.
* libfshelp/translator-list.c (fshelp_get_active_translators): On
mach_port_mod_refs failure, reset err to 0.
Diffstat (limited to 'libfshelp')
-rw-r--r-- | libfshelp/translator-list.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libfshelp/translator-list.c b/libfshelp/translator-list.c index 92b31dd0..63088fe9 100644 --- a/libfshelp/translator-list.c +++ b/libfshelp/translator-list.c @@ -219,7 +219,10 @@ fshelp_get_active_translators (char **translators, err = mach_port_mod_refs (mach_task_self (), t->active, MACH_PORT_RIGHT_SEND, +1); if (err) - continue; + { + err = 0; + continue; + } (*controls)[*controls_count] = t->active; (*controls_count)++; |