Skip to content

Commit 2ae9c18

Browse files
Address review
1 parent 039c6ad commit 2ae9c18

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Modules/_sqlite/row.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ pysqlite_row_subscript(PyObject *op, PyObject *idx)
166166
}
167167
if (eq) {
168168
/* found item */
169-
return PyTuple_GET_ITEM(self->data, i);
169+
PyObject *item = PyTuple_GET_ITEM(self->data, i);
170+
assert(item != NULL);
171+
return Py_NewRef(item);
170172
}
171173
}
172174

0 commit comments

Comments
 (0)