From: Victor Stinner Date: Thu, 2 Feb 2017 09:56:47 +0000 (+0100) Subject: Issue #29368: Fix _Pickle_FastCall() usage in do_append() X-Git-Tag: v3.7.0a1~1437 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd6d0d2a18bb487ec06dbbeb1a53d0ac13384cfe;p=thirdparty%2FPython%2Fcpython.git Issue #29368: Fix _Pickle_FastCall() usage in do_append() _Pickle_FastCall() has a surprising API: it decrements the reference counter of its second argument. --- diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 996d16ede55c..e65b88e9c073 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -5844,7 +5844,6 @@ do_append(UnpicklerObject *self, Py_ssize_t x) return -1; } result = _Pickle_FastCall(extend_func, slice); - Py_DECREF(slice); Py_DECREF(extend_func); if (result == NULL) return -1;