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:
parent
8ba13f1606
commit
67a398f555
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user