]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python: Fix erroneous increments of reference counts
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 3 May 2021 02:43:04 +0000 (14:43 +1200)
committerJeremy Allison <jra@samba.org>
Wed, 19 May 2021 01:32:34 +0000 (01:32 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source3/passdb/py_passdb.c

index eb9239700c14652f1879e4c264b94190e43b8cb6..8988959bfc789463f217bc974e88a592d655bdf2 100644 (file)
@@ -2075,8 +2075,6 @@ static PyObject *py_pdb_enum_group_mapping(PyObject *self, PyObject *args)
        size_t i, num_entries;
        PyObject *py_gmap_list, *py_group_map;
 
-       Py_INCREF(Py_None);
-
        if (!PyArg_ParseTuple(args, "|O!ii:enum_group_mapping", dom_sid_Type, &py_domain_sid,
                                        &lsa_sidtype_value, &unix_only)) {
                talloc_free(frame);
@@ -2814,8 +2812,6 @@ static PyObject *py_pdb_search_aliases(PyObject *self, PyObject *args)
        PyObject *py_domain_sid = Py_None;
        struct dom_sid *domain_sid = NULL;
 
-       Py_INCREF(Py_None);
-
        if (!PyArg_ParseTuple(args, "|O!:search_aliases", dom_sid_Type, &py_domain_sid)) {
                talloc_free(frame);
                return NULL;