[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 31/61: libports: unlock _ports_lock on malloc failure
From: |
Samuel Thibault |
Subject: |
[hurd] 31/61: libports: unlock _ports_lock on malloc failure |
Date: |
Tue, 27 May 2014 08:32:11 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 3ad900b84497a2e619c30f76670e4757e8765f3e
Author: Justus Winter <address@hidden>
Date: Sun May 4 12:14:58 2014 +0200
libports: unlock _ports_lock on malloc failure
* libports/bucket-iterate.c (_ports_bucket_class_iterate): Unlock
_ports_lock on malloc failure.
---
libports/bucket-iterate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libports/bucket-iterate.c b/libports/bucket-iterate.c
index 498cf13..babc204 100644
--- a/libports/bucket-iterate.c
+++ b/libports/bucket-iterate.c
@@ -46,7 +46,10 @@ _ports_bucket_class_iterate (struct port_bucket *bucket,
nr_items = bucket->htable.nr_items;
p = malloc (nr_items * sizeof *p);
if (p == NULL)
- return ENOMEM;
+ {
+ pthread_mutex_unlock (&_ports_lock);
+ return ENOMEM;
+ }
n = 0;
HURD_IHASH_ITERATE (&bucket->htable, arg)
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 23/61: ext2fs: fix type of inum, (continued)
- [hurd] 23/61: ext2fs: fix type of inum, Samuel Thibault, 2014/05/27
- [hurd] 22/61: exec: abbreviate the task name if necessary, Samuel Thibault, 2014/05/27
- [hurd] 46/61: trans/fakeroot: override fshelp_isowner, Samuel Thibault, 2014/05/27
- [hurd] 37/61: libihash: use linear probing and fast modulo operation, Samuel Thibault, 2014/05/27
- [hurd] 44/61: libihash: add hurd_ihash_get_load, Samuel Thibault, 2014/05/27
- [hurd] 52/61: libdiskfs: fix type of dir_cache_id, node_cache_id, Samuel Thibault, 2014/05/27
- [hurd] 54/61: term: fix memory leak, Samuel Thibault, 2014/05/27
- [hurd] 48/61: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2014/05/27
- [hurd] 25/61: libports: reduce malloc overhead in _ports_bucket_class_iterate, Samuel Thibault, 2014/05/27
- [hurd] 42/61: proc: move translation functions to mig-decls.h, Samuel Thibault, 2014/05/27
- [hurd] 31/61: libports: unlock _ports_lock on malloc failure,
Samuel Thibault <=
- [hurd] 61/61: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2014/05/27
- [hurd] 43/61: libihash: fix typo, Samuel Thibault, 2014/05/27
- [hurd] 56/61: ext2fs: fix diskfs_pager_users, Samuel Thibault, 2014/05/27
- [hurd] 57/61: trans/mtab: fix initialization, Samuel Thibault, 2014/05/27
- [hurd] 55/61: libpager: drop unused fields from struct pager, Samuel Thibault, 2014/05/27
- [hurd] 49/61: libdiskfs: lock-less reference counting for peropen objects, Samuel Thibault, 2014/05/27
- [hurd] 30/61: ext2fs: use two distinct pager buckets for the disk and file pager, Samuel Thibault, 2014/05/27
- [hurd] 45/61: include: add lock-less reference counting primitives, Samuel Thibault, 2014/05/27
- [hurd] 58/61: libdiskfs: fix node leak in the name cache, Samuel Thibault, 2014/05/27
- [hurd] 51/61: pfinet: add missing include, Samuel Thibault, 2014/05/27