diff options
-rw-r--r-- | debian/patches/libports-unlock-on-malloc-failure.patch | 25 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/debian/patches/libports-unlock-on-malloc-failure.patch b/debian/patches/libports-unlock-on-malloc-failure.patch new file mode 100644 index 00000000..92191214 --- /dev/null +++ b/debian/patches/libports-unlock-on-malloc-failure.patch @@ -0,0 +1,25 @@ +commit fd84858abe46b126f630fcabee3b43fb739a0654 +Author: Justus Winter <4winter@informatik.uni-hamburg.de> +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. + +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) diff --git a/debian/patches/series b/debian/patches/series index aeef01ea..dcd9aa83 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -46,6 +46,7 @@ fatfs-two-pagers.patch #ext2fs-cache-superblock.patch libpager-singlethreaded.patch libpager-drop-seqnos.patch +libports-unlock-on-malloc-failure.patch libports-lockless-refcounting.patch libports-per-bucket-hashtable.patch libports-a-single-hashtable.patch |