]> granicus.if.org Git - python/commitdiff
Issue #29368: Fix _Pickle_FastCall() usage in do_append()
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 2 Feb 2017 09:56:47 +0000 (10:56 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 2 Feb 2017 09:56:47 +0000 (10:56 +0100)
_Pickle_FastCall() has a surprising API: it decrements the reference counter of
its second argument.

Modules/_pickle.c

index 996d16ede55cc473f11d92abe3591a417ea9e6c9..e65b88e9c0739ae112a1f53f300069428c9e5b60 100644 (file)
@@ -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;