Skip to content
Prev Previous commit
Next Next commit
fix allocation
  • Loading branch information
kumaraditya303 authored Jun 27, 2022
commit 100ad999b6cc0a7bccf47fedd27aa18cbf6ee027
2 changes: 1 addition & 1 deletion Modules/_multiprocessing/semaphore.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ static PyObject *
newsemlockobject(PyTypeObject *type, SEM_HANDLE handle, int kind, int maxvalue,
char *name)
{
SemLockObject *self = PyObject_GC_New(SemLockObject, type);
SemLockObject *self = (SemLockObject *)type->tp_alloc(type, 0);
if (!self)
return NULL;
self->handle = handle;
Expand Down