From 637c7c475adc2a48c4e505f2f99f1495fe7c52bc Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Sat, 20 Apr 2013 21:28:21 -0700 Subject: Fix reference leak in _pickle. --- Modules/_pickle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 5564803..a8d6684 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -5039,11 +5039,13 @@ do_append(UnpicklerObject *self, Py_ssize_t x) if (result == NULL) { Pdata_clear(self->stack, i + 1); Py_SIZE(self->stack) = x; + Py_DECREF(append_func); return -1; } Py_DECREF(result); } Py_SIZE(self->stack) = x; + Py_DECREF(append_func); } return 0; -- cgit v0.12