Skip to content

Commit 9648678

Browse files
committed
Add the lock.
1 parent 7a44c77 commit 9648678

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/_ctypes/_ctypes.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5504,8 +5504,9 @@ Pointer_set_contents(PyObject *op, PyObject *value, void *closure)
55045504
locked_deref_assign(self, dst->b_ptr);
55055505
UNLOCK_PTR(dst);
55065506
} else {
5507-
// We already hold the lock
5507+
LOCK_PTR(self);
55085508
*((void **)self->b_ptr) = dst->b_ptr;
5509+
UNLOCK_PTR(self);
55095510
}
55105511

55115512
/*

0 commit comments

Comments
 (0)