]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
libanl: properly cleanup if first helper thread creation failed (bug 22927)
authorAndreas Schwab <schwab@suse.de>
Mon, 5 Nov 2018 11:47:30 +0000 (12:47 +0100)
committerAndreas Schwab <schwab@suse.de>
Mon, 5 Nov 2018 13:48:24 +0000 (14:48 +0100)
ChangeLog
resolv/gai_misc.c

index ef268e833772fdb943e8bf2068250084a0b10550..5268012d249a9020eab17ee3059c534b75154a33 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-11-05  Andreas Schwab  <schwab@suse.de>
+
+       [BZ #22927]
+       * resolv/gai_misc.c (__gai_enqueue_request): Don't crash if
+       creating the first helper thread failed.
+
 2018-11-03  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
        * sysdeps/mach/hurd/msync.c: New file.
index e7c3b63cc5725b4fc98cef4902f00d9a8228516a..80a2cff8353fcb6cade44431cefcbdf8805cf35b 100644 (file)
@@ -261,8 +261,11 @@ __gai_enqueue_request (struct gaicb *gaicbp)
              /* We cannot create a thread in the moment and there is
                 also no thread running.  This is a problem.  `errno' is
                 set to EAGAIN if this is only a temporary problem.  */
-             assert (lastp->next == newp);
-             lastp->next = NULL;
+             assert (requests == newp || lastp->next == newp);
+             if (lastp != NULL)
+               lastp->next = NULL;
+             else
+               requests = NULL;
              requests_tail = lastp;
 
              newp->next = freelist;