summaryrefslogtreecommitdiffstats
path: root/Modules/_pickle.c
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2013-04-21 04:28:21 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2013-04-21 04:28:21 (GMT)
commit637c7c475adc2a48c4e505f2f99f1495fe7c52bc (patch)
tree3872365deae40b66241631973746f566ac738539 /Modules/_pickle.c
parent6b02772c13000af7065cf774a04a0e6c76cb1238 (diff)
downloadcpython-637c7c475adc2a48c4e505f2f99f1495fe7c52bc.zip
cpython-637c7c475adc2a48c4e505f2f99f1495fe7c52bc.tar.gz
cpython-637c7c475adc2a48c4e505f2f99f1495fe7c52bc.tar.bz2
Fix reference leak in _pickle.
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r--Modules/_pickle.c2
1 files changed, 2 insertions, 0 deletions
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;