diff --git a/Modules/_struct.c b/Modules/_struct.c index c95c76f8ae0..1a5e0ae28e8 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -1442,8 +1442,7 @@ s_new(PyTypeObject *type, PyObject *args, PyObject *kwds) self = alloc_func(type, 0); if (self != NULL) { PyStructObject *s = (PyStructObject*)self; - Py_INCREF(Py_None); - s->s_format = Py_None; + s->s_format = Py_NewRef(Py_None); s->s_codes = NULL; s->s_size = -1; s->s_len = -1;