[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 25/26: libports: fix error handling in _ports_create_port_interna
From: |
Samuel Thibault |
Subject: |
[hurd] 25/26: libports: fix error handling in _ports_create_port_internal |
Date: |
Sat, 02 Nov 2013 14:44:47 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 880dd56f468b57a198ab2136767d03ddaa586eef
Author: Justus Winter <address@hidden>
Date: Fri Nov 1 22:53:12 2013 +0100
libports: fix error handling in _ports_create_port_internal
Previously any err value set before reaching lose: was overwritten and
thus not properly propagated.
Found using the Clang Static Analyzer.
* libports/create-internal.c (_ports_create_port_internal): Fix error
handling.
---
libports/create-internal.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/libports/create-internal.c b/libports/create-internal.c
index c60f6fd..572a55a 100644
--- a/libports/create-internal.c
+++ b/libports/create-internal.c
@@ -109,10 +109,11 @@ _ports_create_port_internal (struct port_class *class,
err = EINTR;
lose:
pthread_mutex_unlock (&_ports_lock);
- lose_unlocked:
- err = mach_port_mod_refs (mach_task_self (), port,
- MACH_PORT_RIGHT_RECEIVE, -1);
- assert_perror (err);
+ lose_unlocked:;
+ error_t e;
+ e = mach_port_mod_refs (mach_task_self (), port,
+ MACH_PORT_RIGHT_RECEIVE, -1);
+ assert_perror (e);
free (pi);
return err;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 09/26: console-client: fix error handling, (continued)
- [hurd] 09/26: console-client: fix error handling, Samuel Thibault, 2013/11/02
- [hurd] 11/26: console-client: replace function epilogue with console_exit, Samuel Thibault, 2013/11/02
- [hurd] 24/26: Fix use after free, Samuel Thibault, 2013/11/02
- [hurd] 12/26: term: fix read on a closed PTY, Samuel Thibault, 2013/11/02
- [hurd] 23/26: libshouldbeinlibc: fix error handling in maptime_map, Samuel Thibault, 2013/11/02
- [hurd] 05/26: trans: rename a global variable, Samuel Thibault, 2013/11/02
- [hurd] 07/26: console-client: remove the pid file on clean exits, Samuel Thibault, 2013/11/02
- [hurd] 08/26: console-client: entitle console_exit with the noreturn attribute, Samuel Thibault, 2013/11/02
- [hurd] 06/26: libfshelp: properly free active translator entries, Samuel Thibault, 2013/11/02
- [hurd] 21/26: configure.ac: properly escape the test for X11/keysymdef.h, Samuel Thibault, 2013/11/02
- [hurd] 25/26: libports: fix error handling in _ports_create_port_internal,
Samuel Thibault <=
- [hurd] 14/26: libdiskfs: fix removal of socket nodes, Samuel Thibault, 2013/11/02
- [hurd] 22/26: exec: Remove the remaining BFD related bits, Samuel Thibault, 2013/11/02
- [hurd] 13/26: pflocal: fix destruction of explicitely bound sockets, Samuel Thibault, 2013/11/02
- [hurd] 20/26: Make boot script accept more fsck values, Samuel Thibault, 2013/11/02
- [hurd] 19/26: Add xenl to hurd.ti, Samuel Thibault, 2013/11/02
- [hurd] 18/26: Make CUD more usual, Samuel Thibault, 2013/11/02
- [hurd] 17/26: Make boot script reboot when fsck told so, Samuel Thibault, 2013/11/02
- [hurd] 15/26: pflocal: fix port leak when receiving port rights, Samuel Thibault, 2013/11/02
- [hurd] 16/26: pflocal: fix message flags on receive, Samuel Thibault, 2013/11/02