diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-03-04 10:44:22 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-03-04 22:07:24 +0100 |
commit | 349b9b72ec36194a1275eaa42ca145071256b623 (patch) | |
tree | 1727c1db47c347aae354f796bcbc3a13c00810c8 /source4/lib/ldb | |
parent | 746194cfc4e0c119e1947f79ffc7cb50d50b9f43 (diff) | |
download | samba-349b9b72ec36194a1275eaa42ca145071256b623.tar.gz samba-349b9b72ec36194a1275eaa42ca145071256b623.tar.bz2 samba-349b9b72ec36194a1275eaa42ca145071256b623.zip |
s4:dsdb - we don't need to check if a DN != NULL if we call "ldb_dn_validate"
"ldb_dn_validate" is NULL-safe and does the check implicitly.
Reviewed by: Tridge
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/pyldb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index c1962e612f..d14487ba02 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -553,8 +553,7 @@ static PyObject *py_ldb_dn_new(PyTypeObject *type, PyObject *args, PyObject *kwa } ret = ldb_dn_new(mem_ctx, ldb_ctx, str); - - if (ret == NULL || !ldb_dn_validate(ret)) { + if (!ldb_dn_validate(ret)) { talloc_free(mem_ctx); PyErr_SetString(PyExc_ValueError, "unable to parse dn string"); return NULL; |