summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-03-15 17:10:24 +0100
committerJulian Andres Klode <jak@debian.org>2010-03-15 17:10:24 +0100
commit29353cf54289f80eaa5923a1c73a36fb0bf3abb9 (patch)
tree8b45aa4495cb959565702324b4401dc22047de83 /python
parentdbfcddec5c85d306a97cdf73e539656c6d7225c5 (diff)
downloadpython-apt-29353cf54289f80eaa5923a1c73a36fb0bf3abb9.tar.gz
Correctly fix the last one, PyErr_Restore takes a reference.
Diffstat (limited to 'python')
-rw-r--r--python/generic.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/generic.cc b/python/generic.cc
index 84dda9aa..1c68a481 100644
--- a/python/generic.cc
+++ b/python/generic.cc
@@ -104,6 +104,9 @@ PyObject *_PyAptObject_getattro(PyObject *self, PyObject *attr) {
PyErr_WarnEx(PyExc_DeprecationWarning, warning_string, 1);
delete[] warning_string;
} else {
+ Py_XINCREF(ptype);
+ Py_XINCREF(pvalue);
+ Py_XINCREF(ptraceback);
PyErr_Restore(ptype, pvalue, ptraceback);
}
Py_DECREF(newattr);