diff options
-rw-r--r-- | source3/lib/ldb/ldb_tdb/ldb_index.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/lib/ldb/ldb_tdb/ldb_index.c b/source3/lib/ldb/ldb_tdb/ldb_index.c index d7a8e5e9b5..2c88d7e19d 100644 --- a/source3/lib/ldb/ldb_tdb/ldb_index.c +++ b/source3/lib/ldb/ldb_tdb/ldb_index.c @@ -721,12 +721,15 @@ static int ltdb_index_filter(const struct dn_list *dn_list, */ int ltdb_search_indexed(struct ldb_handle *handle) { - struct ltdb_context *ac = talloc_get_type(handle->private_data, struct ltdb_context); - struct ltdb_private *ltdb = talloc_get_type(ac->module->private_data, struct ltdb_private); + struct ltdb_context *ac; + struct ltdb_private *ltdb; struct dn_list *dn_list; int ret; - if ((ac == NULL) || (ltdb == NULL)) { + if (!(ac = talloc_get_type(handle->private_data, + struct ltdb_context)) || + !(ltdb = talloc_get_type(ac->module->private_data, + struct ltdb_private))) { return -1; } |