From: Roland McGrath Date: Thu, 30 Jan 2003 20:46:44 +0000 (+0000) Subject: 2003-01-30 Roland McGrath X-Git-Tag: cvs/glibc-2_3_2~222 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2806140931582422258904a47d34c744f3157d1e;p=thirdparty%2Fglibc.git 2003-01-30 Roland McGrath * sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Move check for null argument before all else. Reported by Martin Schwidefsky . --- diff --git a/sysdeps/generic/dl-tls.c b/sysdeps/generic/dl-tls.c index 0afe379ae6a..1981d2dd989 100644 --- a/sysdeps/generic/dl-tls.c +++ b/sysdeps/generic/dl-tls.c @@ -329,14 +329,14 @@ void * internal_function _dl_allocate_tls_init (void *result) { - dtv_t *dtv = GET_DTV (result); - struct dtv_slotinfo_list *listp; - size_t total = 0; - if (result == NULL) /* The memory allocation failed. */ return NULL; + dtv_t *dtv = GET_DTV (result); + struct dtv_slotinfo_list *listp; + size_t total = 0; + /* We have to look prepare the dtv for all currently loaded modules using TLS. For those which are dynamically loaded we add the values indicating deferred allocation. */