From e4152a37c6e288382c64942edc2edda410681c9b Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 20 Jan 2021 22:17:01 -0800 Subject: fixes #1413 nni_thr_setname NULL pointer dereference --- src/core/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/thread.c') diff --git a/src/core/thread.c b/src/core/thread.c index f686612b..6f50476a 100644 --- a/src/core/thread.c +++ b/src/core/thread.c @@ -1,5 +1,5 @@ // -// Copyright 2020 Staysail Systems, Inc. +// Copyright 2021 Staysail Systems, Inc. // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -171,5 +171,5 @@ nni_thr_is_self(nni_thr *thr) void nni_thr_set_name(nni_thr *thr, const char *name) { - nni_plat_thr_set_name(&thr->thr, name); + nni_plat_thr_set_name(thr != NULL ? &thr->thr : NULL, name); } \ No newline at end of file -- cgit v1.2.3-70-g09d2