Skip to content

Commit a026273

Browse files
fix ref leaks
1 parent 4583625 commit a026273

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_struct.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,6 +1480,7 @@ Struct_impl(PyTypeObject *type, PyObject *format)
14801480
self->s_format = format;
14811481

14821482
if (prepare_s(self) < 0) {
1483+
Py_DECREF(self);
14831484
return NULL;
14841485
}
14851486
return (PyObject *)self;

0 commit comments

Comments
 (0)