Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fixed crash due to unnecessary decref of a borrowed reference in para…
…ms array handling
  • Loading branch information
lostmsu committed Jun 17, 2020
commit d87d0333f4e88e37c2e63cc335edd00f9521a1a9
6 changes: 1 addition & 5 deletions src/runtime/methodbinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, Meth
static IntPtr HandleParamsArray(IntPtr args, int arrayStart, int pyArgCount, out bool isNewReference)
{
isNewReference = false;
IntPtr op;
IntPtr op;
// for a params method, we may have a sequence or single/multiple items
// here we look to see if the item at the paramIndex is there or not
// and then if it is a sequence itself.
Expand All @@ -390,10 +390,6 @@ static IntPtr HandleParamsArray(IntPtr args, int arrayStart, int pyArgCount, out
{
isNewReference = true;
op = Runtime.PyTuple_GetSlice(args, arrayStart, pyArgCount);
if (item != IntPtr.Zero)
{
Runtime.XDecref(item);
}
}
}
else
Expand Down