This is an automated email from the git hooks/post-receive script. sthibault pushed a commit to branch dde in repository hurd.
commit 47715139bb7bc8e2c94536a34207e0028a7f65b4 Author: Justus Winter <[email protected]> Date: Sun Oct 9 23:38:50 2016 +0200 libfshelp: Improve error handling. * libfshelp/translator-list.c (fshelp_set_active_translator): Free resources. Assert that an entry is removed. (fshelp_remove_active_translator): Assert that an entry is removed. --- libfshelp/translator-list.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/libfshelp/translator-list.c b/libfshelp/translator-list.c index c64e174..91a2c34 100644 --- a/libfshelp/translator-list.c +++ b/libfshelp/translator-list.c @@ -20,6 +20,7 @@ along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */ #include <argz.h> +#include <assert-backtrace.h> #include <hurd/fsys.h> #include <hurd/ihash.h> #include <hurd/ports.h> @@ -113,7 +114,11 @@ fshelp_set_active_translator (struct port_info *pi, err = hurd_ihash_locp_add (&translator_ihash, slot, (hurd_ihash_key_t) t->name, t); if (err) - goto out; + { + free (t->name); + free (t); + goto out; + } update: if (MACH_PORT_VALID (active)) @@ -142,7 +147,11 @@ fshelp_set_active_translator (struct port_info *pi, t->active = active; } else - hurd_ihash_remove (&translator_ihash, (hurd_ihash_key_t) t); + { + int ok; + ok = hurd_ihash_remove (&translator_ihash, (hurd_ihash_key_t) t->name); + assert_backtrace (ok); + } out: pthread_mutex_unlock (&translator_ihash_lock); @@ -170,7 +179,11 @@ fshelp_remove_active_translator (mach_port_t active) } if (t) - hurd_ihash_remove (&translator_ihash, (hurd_ihash_key_t) t->name); + { + int ok; + ok = hurd_ihash_remove (&translator_ihash, (hurd_ihash_key_t) t->name); + assert_backtrace (ok); + } pthread_mutex_unlock (&translator_ihash_lock); return err; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hurd/hurd.git
