]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1574b] made sure Py_True/False gained refcount on return.
authorJINMEI Tatuya <jinmei@isc.org>
Tue, 31 Jan 2012 00:00:22 +0000 (16:00 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Tue, 31 Jan 2012 00:00:22 +0000 (16:00 -0800)
src/lib/dns/python/nsec3hash_python.cc

index 91eb4486363627ceda841a5d4ee79dbd38164b10..68c9ffaa2f56b84130283719181c45d55e11b66a 100644 (file)
@@ -134,7 +134,9 @@ NSEC3Hash_match(PyObject* po_self, PyObject* args) {
             const bool matched = self->cppobj->match(
                 dynamic_cast<const generic::NSEC3&>(
                     PyRdata_ToRdata(po_rdata)));
-            return (matched ? Py_True : Py_False);
+            PyObject* ret = matched ? Py_True : Py_False;
+            Py_INCREF(ret);
+            return (ret);
         }
     } catch (const exception& ex) {
         const string ex_what = "Unexpected failure in NSEC3Hash.match: " +