Skip to content

Commit 3709cf9

Browse files
committed
Simplify with Py_CLEAR
1 parent bfb0c71 commit 3709cf9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Modules/_io/iobase.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,8 +958,7 @@ _io__RawIOBase_read_impl(PyObject *self, Py_ssize_t n)
958958
PyErr_Format(PyExc_ValueError,
959959
"resize returned unexpected value %R",
960960
res);
961-
Py_DECREF(res);
962-
res = NULL;
961+
Py_CLEAR(res);
963962
}
964963
return res;
965964
}

0 commit comments

Comments
 (0)