svn commit: r349984 - stable/11/lib/libthr/thread
Konstantin Belousov
kib at FreeBSD.org
Sun Jul 14 05:41:15 UTC 2019
Author: kib
Date: Sun Jul 14 05:41:14 2019
New Revision: 349984
URL: https://svnweb.freebsd.org/changeset/base/349984
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/11/lib/libthr/thread/thr_info.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/lib/libthr/thread/thr_info.c
==============================================================================
--- stable/11/lib/libthr/thread/thr_info.c Sun Jul 14 05:40:03 2019 (r349983)
+++ stable/11/lib/libthr/thread/thr_info.c Sun Jul 14 05:41:14 2019 (r349984)
@@ -50,7 +50,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