BIND 10 trac1028, updated. 6442c07428bf7b8abeb73c4b6a7729ecd4b853c5 [1028] one final piggy-back fix: don't increment reference to the base obj unless tp_alloc succeeds.
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Oct 27 17:28:13 UTC 2011
The branch, trac1028 has been updated
via 6442c07428bf7b8abeb73c4b6a7729ecd4b853c5 (commit)
from 4f6c6441787be0a145917ae8935b70bb89f27b7a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6442c07428bf7b8abeb73c4b6a7729ecd4b853c5
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Thu Oct 27 10:27:14 2011 -0700
[1028] one final piggy-back fix: don't increment reference to the base obj
unless tp_alloc succeeds.
-----------------------------------------------------------------------
Summary of changes:
src/lib/python/isc/datasrc/finder_python.cc | 16 ++++++++--------
src/lib/python/isc/datasrc/iterator_python.cc | 6 +++---
2 files changed, 11 insertions(+), 11 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/datasrc/finder_python.cc b/src/lib/python/isc/datasrc/finder_python.cc
index cb02724..6585049 100644
--- a/src/lib/python/isc/datasrc/finder_python.cc
+++ b/src/lib/python/isc/datasrc/finder_python.cc
@@ -268,16 +268,16 @@ PyTypeObject zonefinder_type = {
PyObject*
createZoneFinderObject(isc::datasrc::ZoneFinderPtr source, PyObject* base_obj) {
- s_ZoneFinder* py_zi = static_cast<s_ZoneFinder*>(
+ s_ZoneFinder* py_zf = static_cast<s_ZoneFinder*>(
zonefinder_type.tp_alloc(&zonefinder_type, 0));
- if (py_zi != NULL) {
- py_zi->cppobj = source;
- py_zi->base_obj = base_obj;
- }
- if (base_obj != NULL) {
- Py_INCREF(base_obj);
+ if (py_zf != NULL) {
+ py_zf->cppobj = source;
+ py_zf->base_obj = base_obj;
+ if (base_obj != NULL) {
+ Py_INCREF(base_obj);
+ }
}
- return (py_zi);
+ return (py_zf);
}
} // namespace python
diff --git a/src/lib/python/isc/datasrc/iterator_python.cc b/src/lib/python/isc/datasrc/iterator_python.cc
index c52ab4a..eb368ba 100644
--- a/src/lib/python/isc/datasrc/iterator_python.cc
+++ b/src/lib/python/isc/datasrc/iterator_python.cc
@@ -204,9 +204,9 @@ createZoneIteratorObject(isc::datasrc::ZoneIteratorPtr source,
if (py_zi != NULL) {
py_zi->cppobj = source;
py_zi->base_obj = base_obj;
- }
- if (base_obj != NULL) {
- Py_INCREF(base_obj);
+ if (base_obj != NULL) {
+ Py_INCREF(base_obj);
+ }
}
return (py_zi);
}
More information about the bind10-changes
mailing list