summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb.i
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb.i')
-rw-r--r--source4/lib/ldb/ldb.i3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/lib/ldb/ldb.i b/source4/lib/ldb/ldb.i
index 35d443e809..0f05c1fbab 100644
--- a/source4/lib/ldb/ldb.i
+++ b/source4/lib/ldb/ldb.i
@@ -217,7 +217,7 @@ typedef struct ldb_dn {
we do it this way... */
talloc_steal(NULL, ret);
- if (ret == NULL)
+ if (ret == NULL || !ldb_dn_validate(ret))
SWIG_exception(SWIG_ValueError,
"unable to parse dn string");
fail:
@@ -263,7 +263,6 @@ fail:
{
char *dn = ldb_dn_get_linearized($self), *ret;
asprintf(&ret, "Dn('%s')", dn);
- talloc_free(dn);
return ret;
}