summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2014-01-14 21:53:48 +0100
committerJulian Andres Klode <jak@debian.org>2014-01-14 21:53:48 +0100
commit14a0a07a331c936537a346f69e3c39db175e00cf (patch)
treef776432155482e048962ce9ae9e25d2324cb5eaf /python
parentd72fb3567d08dea6739a37ae641e80b79c524915 (diff)
downloadpython-apt-14a0a07a331c936537a346f69e3c39db175e00cf.tar.gz
python/pkgmanager.cc: Do not create temporary CppPyRef
Instead of creating a CppPyRef with the only purpose of destroying it, just decrement the reference count. Reported-by: cppcheck
Diffstat (limited to 'python')
-rw-r--r--python/pkgmanager.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc
index cf19e6bf..05f033f3 100644
--- a/python/pkgmanager.cc
+++ b/python/pkgmanager.cc
@@ -191,7 +191,7 @@ class PyPkgManager : public pkgDPkgPM {
StatusFd));
}
virtual void Reset() {
- CppPyRef(PyObject_CallMethod(pyinst, "reset", NULL));
+ Py_XDECREF(PyObject_CallMethod(pyinst, "reset", NULL));
}
public: