Hi Andrew,
Andrew Bartlett wrote:
> diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
> index d55e0aa..67e1d5c 100644
> --- a/source4/lib/ldb/pyldb.c
> +++ b/source4/lib/ldb/pyldb.c
> @@ -845,6 +845,35 @@ static PyObject *py_ldb_parse_ldif(PyLdbObject *self,
> PyObject *args)
> return PyObject_GetIter(list);
> }
>
> +static PyObject *py_ldb_msg_diff(PyLdbObject *self, PyObject *args)
> +{
> + PyObject *py_msg_old;
> + PyObject *py_msg_new;
> + struct ldb_message *diff;
> + PyObject *py_ret;
> +
> + if (!PyArg_ParseTuple(args, "OO", &py_msg_old, &py_msg_new))
> + return NULL;
> +
> + if (!PyLdbMessage_Check(py_msg_old)) {
> + PyErr_SetString(PyExc_TypeError, "Expected Ldb Message for old
> message");
> + return NULL;
> + }
> +
> + if (!PyLdbMessage_Check(py_msg_new)) {
> + PyErr_SetString(PyExc_TypeError, "Expected Ldb Message for new
> message");
> + return NULL;
> + }
> +
> + diff = ldb_msg_diff(PyLdb_AsLdbContext(self),
> PyLdbMessage_AsMessage(py_msg_old), PyLdbMessage_AsMessage(py_msg_new));
> + if (diff == NULL)
> + return NULL;
^^^ There seems to be a "PyErr_Set...()" call missing in the "if (diff
== NULL)" case.
Cheers,
Jelmer