From f85ffbf3d07426e0fb2f80145fdb229b059dd67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Tue, 3 May 2022 20:12:03 +0200 Subject: [PATCH] _frida: Fix refcounting in `get_max_argument_count()` PyTuple_GetItem() returns a borrowed reference. Kudos to @rev1si0n for finding this embarrassing bug. --- src/_frida.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/_frida.c b/src/_frida.c index fb477ec..b6a9abe 100644 --- a/src/_frida.c +++ b/src/_frida.c @@ -5567,8 +5567,6 @@ PyFrida_get_max_argument_count (PyObject * callable) Py_DECREF (is_method); beach: - Py_XDECREF (args); - Py_XDECREF (varargs); Py_XDECREF (spec); return result;