svn commit: r349982 - stable/12/lib/libthr/thread
Konstantin Belousov
kib at FreeBSD.org
Sun Jul 14 05:39:03 UTC 2019
Author: kib
Date: Sun Jul 14 05:39:02 2019
New Revision: 349982
URL: https://svnweb.freebsd.org/changeset/base/349982
Log:
MFC r349912:
Restore ability to pass NULL name argument to pthread_set_name_np(3)
to clear the thread name.
PR: 239142
Modified:
stable/12/lib/libthr/thread/thr_info.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/lib/libthr/thread/thr_info.c
==============================================================================
--- stable/12/lib/libthr/thread/thr_info.c Sun Jul 14 03:49:48 2019 (r349981)
+++ stable/12/lib/libthr/thread/thr_info.c Sun Jul 14 05:39:02 2019 (r349982)
@@ -52,7 +52,7 @@ thr_set_name_np(struct pthread *thread, const char *na
{
free(thread->name);
- thread->name = strdup(name);
+ thread->name = name != NULL ? strdup(name) : NULL;
}
/* Set the thread name for debug. */
More information about the svn-src-all
mailing list