There was an error while loading. Please reload this page.
1 parent 0df980d commit 88d3efeCopy full SHA for 88d3efe
1 file changed
Modules/_sqlite/cursor.c
@@ -299,12 +299,9 @@ pysqlite_build_row_cast_map(pysqlite_Cursor* self)
299
}
300
301
302
- if (!converter) {
303
- converter = Py_NewRef(Py_None);
304
- }
305
-
306
- int rc = PyList_Append(self->row_cast_map, converter);
307
- Py_DECREF(converter);
+ int rc = PyList_Append(self->row_cast_map,
+ converter ? converter : Py_None);
+ Py_XDECREF(converter);
308
if (rc != 0) {
309
Py_CLEAR(self->row_cast_map);
310
return -1;
0 commit comments