1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

pyldb: py_ldb_dn_add_child() uses PyErr_LDB_DN_OR_RAISE

for self->dn only. The other dn is a different story, next commit.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2024-04-10 14:41:09 +12:00 committed by Andrew Bartlett
parent 1eeb0e3651
commit 310624ead5
2 changed files with 7 additions and 8 deletions

View File

@ -648,16 +648,18 @@ static PyObject *py_ldb_dn_get_parent(PyObject *self,
return (PyObject *)py_ret;
}
static PyObject *py_ldb_dn_add_child(PyLdbDnObject *self, PyObject *args)
static PyObject *py_ldb_dn_add_child(PyObject *self, PyObject *args)
{
PyObject *py_other;
struct ldb_dn *dn, *other;
PyObject *py_other = NULL;
struct ldb_dn *dn = NULL;
struct ldb_dn *other = NULL;
bool ok;
PyErr_LDB_DN_OR_RAISE(self, dn);
if (!PyArg_ParseTuple(args, "O", &py_other))
return NULL;
dn = pyldb_Dn_AS_DN((PyObject *)self);
if (!pyldb_Object_AsDn(NULL, py_other, ldb_dn_get_ldb_context(dn), &other))
return NULL;

View File

@ -1,3 +0,0 @@
^samba\.tests\.segfault\.samba\.tests\.segfault\.SegfaultTests\.test_ldb_use_after_free_dn_assign_disconnecting_connection\(ad_dc\)
^samba\.tests\.segfault\.samba\.tests\.segfault\.SegfaultTests\.test_ldb_use_after_free_dn_assign_disconnecting_connection_add_child_later\(ad_dc\)
^samba\.tests\.segfault\.samba\.tests\.segfault\.SegfaultTests\.test_ldb_use_after_free_dn_assign_disconnecting_connection_no_del\(ad_dc\)