Author: kib Date: Thu Jul 11 16:19:33 2019 New Revision: 349912 URL: https://svnweb.freebsd.org/changeset/base/349912
Log: Restore ability to pass NULL name argument to pthread_set_name_np(3) to clear the thread name. PR: 239142 Submitted by: Lewis Donzis <l...@perftech.com> MFC after: 3 days Modified: head/lib/libthr/thread/thr_info.c Modified: head/lib/libthr/thread/thr_info.c ============================================================================== --- head/lib/libthr/thread/thr_info.c Thu Jul 11 15:38:40 2019 (r349911) +++ head/lib/libthr/thread/thr_info.c Thu Jul 11 16:19:33 2019 (r349912) @@ -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. */ _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"