summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/pyldb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/pyldb.c')
-rw-r--r--source4/lib/ldb/pyldb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 47d12b928d..c2d75b43d3 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -1959,7 +1959,7 @@ static PyObject *py_ldb_msg_element_new(PyTypeObject *type, PyObject *args, PyOb
return NULL;
}
el->values[i].length = PyString_Size(item);
- el->values[i].data = talloc_memdup(el,
+ el->values[i].data = talloc_memdup(el,
(uint8_t *)PyString_AsString(item), el->values[i].length+1);
}
} else {
@@ -2187,7 +2187,7 @@ static PyObject *py_ldb_msg_add(PyLdbMessageObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "O!", &PyLdbMessageElement, &py_element))
return NULL;
- el = talloc_reference(msg, py_element->mem_ctx);
+ el = talloc_reference(msg, py_element->el);
if (el == NULL) {
PyErr_NoMemory();
return NULL;