From a10670e4e770444f7f6762b3280380749220c1e1 Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 25 Sep 2025 14:03:10 +0000 Subject: small amend - move mutex assignment after check alloc was successful --- win/tclWinThrd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 65cb71d..26cd138 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -1005,10 +1005,10 @@ TclpNewAllocMutex(void) allocMutex *lockPtr; lockPtr = (allocMutex *)malloc(sizeof(allocMutex)); - lockPtr->tlock = (Tcl_Mutex)&lockPtr->wm; if (lockPtr == NULL) { Tcl_Panic("could not allocate lock"); } + lockPtr->tlock = (Tcl_Mutex)&lockPtr->wm; WMutexInit(&lockPtr->wm); return &lockPtr->tlock; } -- cgit v0.12