Skip to content

Commit

Permalink
Fix first item in sequence memory leak from ref count increasing
Browse files Browse the repository at this point in the history
Fix suggested by @v-chojas and @gordthompson
  • Loading branch information
mavxg authored and mkleehammer committed Apr 16, 2024
1 parent 41df94d commit 7a710e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,7 @@ bool BindParameter(Cursor* cur, Py_ssize_t index, ParamInfo& info)
{
// Bind the TVP's columns --- all need to use DAE
PyObject *param = PySequence_GetItem(row, i);
Py_XDECREF(param);
GetParameterInfo(cur, i, param, info.nested[i], true);
info.nested[i].BufferLength = info.nested[i].StrLen_or_Ind;
info.nested[i].StrLen_or_Ind = SQL_DATA_AT_EXEC;
Expand Down

0 comments on commit 7a710e7

Please sign in to comment.