diff options
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/pyldb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index a05aab5b83..8a061c7e8e 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -1544,9 +1544,9 @@ static PyObject *py_ldb_msg_element_new(PyTypeObject *type, PyObject *args, PyOb el->values = talloc_array(el, struct ldb_val, el->num_values); for (i = 0; i < el->num_values; i++) { PyObject *item = PySequence_GetItem(py_elements, i); + el->values[i].length = PyString_Size(item); el->values[i].data = talloc_memdup(el, (uint8_t *)PyString_AsString(item), el->values[i].length); - el->values[i].length = PyString_Size(item); } } else { PyErr_SetString(PyExc_TypeError, |