Skip to content

Commit 7a710e7

Browse files
mavxgmkleehammer
authored andcommitted
Fix first item in sequence memory leak from ref count increasing
Fix suggested by @v-chojas and @gordthompson
1 parent 41df94d commit 7a710e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/params.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,7 @@ bool BindParameter(Cursor* cur, Py_ssize_t index, ParamInfo& info)
12661266
{
12671267
// Bind the TVP's columns --- all need to use DAE
12681268
PyObject *param = PySequence_GetItem(row, i);
1269+
Py_XDECREF(param);
12691270
GetParameterInfo(cur, i, param, info.nested[i], true);
12701271
info.nested[i].BufferLength = info.nested[i].StrLen_or_Ind;
12711272
info.nested[i].StrLen_or_Ind = SQL_DATA_AT_EXEC;

0 commit comments

Comments
 (0)