Skip to content

Commit e705379

Browse files
committed
Unlock mutex in error path
1 parent aa1a5ca commit e705379

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Objects/codeobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,12 +702,12 @@ _PyCode_New(struct _PyCodeConstructor *con)
702702
PyMutex_Lock(&state->mutex);
703703
#endif
704704
consts_interned = intern_constants(con->consts);
705-
if (!consts_interned) {
706-
goto finally;
707-
}
708705
#ifdef Py_GIL_DISABLED
709706
PyMutex_Unlock(&state->mutex);
710707
#endif
708+
if (!consts_interned) {
709+
goto finally;
710+
}
711711
localsplusnames_interned = intern_names(con->localsplusnames);
712712
if (!localsplusnames_interned) {
713713
goto finally;

0 commit comments

Comments
 (0)