s3-py_passdb Ensure that group mapping list input is initailised
authorAndrew Bartlett <abartlet@samba.org>
Tue, 8 Nov 2011 21:15:31 +0000 (08:15 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 9 Nov 2011 22:38:25 +0000 (23:38 +0100)
This may help to ensure we consistantly crash on an incorrect de-reference.

Andrew Bartlett

source3/passdb/py_passdb.c

index 4c8dbcdbd23e4e17580680bb61b49200a8f802fc..0f71837900c685419207b3b5d65319e6c7695b09 100644 (file)
@@ -1805,7 +1805,8 @@ static PyObject *py_pdb_enum_group_mapping(pytalloc_Object *self, PyObject *args
        int unix_only = 0;
        PyObject *py_domain_sid;
        struct dom_sid *domain_sid = NULL;
-       GROUP_MAP **gmap, *group_map;
+       GROUP_MAP **gmap = NULL;
+       GROUP_MAP *group_map;
        size_t num_entries;
        PyObject *py_gmap_list, *py_group_map;
        int i;