Skip to content

Commit 74e7d62

Browse files
committed
fixed crash due to unnecessary decref of a borrowed reference in params array handling
1 parent be72bd4 commit 74e7d62

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/runtime/methodbinder.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, Meth
375375
static IntPtr HandleParamsArray(IntPtr args, int arrayStart, int pyArgCount, out bool isNewReference)
376376
{
377377
isNewReference = false;
378-
IntPtr op;
378+
IntPtr op;
379379
// for a params method, we may have a sequence or single/multiple items
380380
// here we look to see if the item at the paramIndex is there or not
381381
// and then if it is a sequence itself.
@@ -393,10 +393,6 @@ static IntPtr HandleParamsArray(IntPtr args, int arrayStart, int pyArgCount, out
393393
{
394394
isNewReference = true;
395395
op = Runtime.PyTuple_GetSlice(args, arrayStart, pyArgCount);
396-
if (item != IntPtr.Zero)
397-
{
398-
Runtime.XDecref(item);
399-
}
400396
}
401397
}
402398
else

0 commit comments

Comments
 (0)