about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/dl-tls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/generic/dl-tls.c b/sysdeps/generic/dl-tls.c
index eb9a37bf95..5c05baee0c 100644
--- a/sysdeps/generic/dl-tls.c
+++ b/sysdeps/generic/dl-tls.c
@@ -217,7 +217,8 @@ _dl_allocate_tls (void)
 		      '\0',
 		      runp->l_tls_blocksize - runp->l_tls_initimage_size);
 	    }
-	  while ((runp = runp->l_tls_nextimage) != NULL);
+	  while ((runp = runp->l_tls_nextimage)
+		 !=  GL(dl_initimage_list)->l_tls_nextimage);
 	}
 
       /* Add the dtv to the thread data structures.  */