diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-05-04 18:11:19 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-05-04 18:11:19 +0200 |
commit | 9c2c1986c6f9905c8aff566da20b1ddaa3c0b3be (patch) | |
tree | e539b5cf2877d18e4ea2ae9bd9bbbe4feab876fc /debian/patches/libports-unlock-on-malloc-failure.patch | |
parent | 79fa1a62f175511cc5a395e819ab8b6a6cf1b569 (diff) |
add libports-unlock-on-malloc-failure.patch
Diffstat (limited to 'debian/patches/libports-unlock-on-malloc-failure.patch')
-rw-r--r-- | debian/patches/libports-unlock-on-malloc-failure.patch | 25 |
1 files changed, 25 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) |