[SCM] Samba Shared Repository - branch master updated
Amitay Isaacs
amitay at samba.org
Fri Nov 11 04:05:01 MST 2011
The branch, master has been updated
via 29b5a95 py_passdb: Cannot steal an item pointer from an array
from c2eb036 policy/tests: Fix import of TestCase.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 29b5a95b1f85f1e7493fb6be4ea5eaf7931d9c23
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Nov 11 15:29:35 2011 +1100
py_passdb: Cannot steal an item pointer from an array
Autobuild-User: Amitay Isaacs <amitay at samba.org>
Autobuild-Date: Fri Nov 11 12:04:33 CET 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source3/passdb/py_passdb.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c
index 0f71837..de27839 100644
--- a/source3/passdb/py_passdb.c
+++ b/source3/passdb/py_passdb.c
@@ -2236,7 +2236,7 @@ static PyObject *py_pdb_enum_aliasmem(pytalloc_Object *self, PyObject *args)
struct pdb_methods *methods;
TALLOC_CTX *tframe;
PyObject *py_alias_sid;
- struct dom_sid *alias_sid, *member_sid;
+ struct dom_sid *alias_sid, *member_sid, *tmp_sid;
PyObject *py_member_list, *py_member_sid;
size_t num_members;
int i;
@@ -2271,10 +2271,15 @@ static PyObject *py_pdb_enum_aliasmem(pytalloc_Object *self, PyObject *args)
}
for(i=0; i<num_members; i++) {
- py_member_sid = pytalloc_steal(dom_sid_Type, &member_sid[i]);
- if (py_member_sid) {
- PyList_Append(py_member_list, py_member_sid);
+ py_member_sid = pytalloc_new(struct dom_sid, dom_sid_Type);
+ if (py_member_sid == NULL) {
+ PyErr_NoMemory();
+ talloc_free(tframe);
+ return NULL;
}
+ tmp_sid = pytalloc_get_ptr(py_member_sid);
+ *tmp_sid = member_sid[i];
+ PyList_Append(py_member_list, py_member_sid);
}
talloc_free(tframe);
--
Samba Shared Repository
More information about the samba-cvs
mailing list