diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-10-21 00:10:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:35 -0500 |
commit | 7a390a0dabcdadb30196662b6cdec512bf81dcb4 (patch) | |
tree | 8ed126e072e4446ad47d25f277059af5ccd556cc /source3/lib/ldb/ldb_tdb/ldb_index.c | |
parent | aa3ca346d82da2501406cc1f482643b20905e467 (diff) | |
download | samba-7a390a0dabcdadb30196662b6cdec512bf81dcb4.tar.gz samba-7a390a0dabcdadb30196662b6cdec512bf81dcb4.tar.bz2 samba-7a390a0dabcdadb30196662b6cdec512bf81dcb4.zip |
r19430: merge recent ldb changes from Samba4. This includes memory leak fixes
and significant speedups
(This used to be commit bb5c205fef90aa8b89ba400fb9f2f37a111676a8)
Diffstat (limited to 'source3/lib/ldb/ldb_tdb/ldb_index.c')
-rw-r--r-- | source3/lib/ldb/ldb_tdb/ldb_index.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/ldb/ldb_tdb/ldb_index.c b/source3/lib/ldb/ldb_tdb/ldb_index.c index 8a9a82a98c..0c9d1f33a1 100644 --- a/source3/lib/ldb/ldb_tdb/ldb_index.c +++ b/source3/lib/ldb/ldb_tdb/ldb_index.c @@ -1030,6 +1030,12 @@ int ltdb_index_del(struct ldb_module *module, const struct ldb_message *msg) char *dn; unsigned int i, j; + /* find the list of indexed fields */ + if (ltdb->cache->indexlist->num_elements == 0) { + /* no indexed fields */ + return 0; + } + if (ldb_dn_is_special(msg->dn)) { return 0; } @@ -1039,12 +1045,6 @@ int ltdb_index_del(struct ldb_module *module, const struct ldb_message *msg) return -1; } - /* find the list of indexed fields */ - if (ltdb->cache->indexlist->num_elements == 0) { - /* no indexed fields */ - return 0; - } - for (i = 0; i < msg->num_elements; i++) { ret = ldb_msg_find_idx(ltdb->cache->indexlist, msg->elements[i].name, NULL, LTDB_IDXATTR); |