Restore ability to pass NULL name argument to pthread_set_name_np(3)

to clear the thread name.

PR:	239142
Submitted by:	Lewis Donzis <lew@perftech.com>
MFC after:	3 days
This commit is contained in:
kib 2019-07-11 16:19:33 +00:00
parent 8ba13f1606
commit 67a398f555

View File

@ -52,7 +52,7 @@ thr_set_name_np(struct pthread *thread, const char *name)
{
free(thread->name);
thread->name = strdup(name);
thread->name = name != NULL ? strdup(name) : NULL;
}
/* Set the thread name for debug. */