summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-11-25 17:14:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:08 -0500
commit2685e167fa12d696bf3882e888629f95b81e7683 (patch)
treebe4423073f8fe899b33cfc3eecca03b9edf7afda
parenta12fb3afdda89dd5d5eec6c9371512f668645446 (diff)
downloadsamba-2685e167fa12d696bf3882e888629f95b81e7683.tar.gz
samba-2685e167fa12d696bf3882e888629f95b81e7683.tar.bz2
samba-2685e167fa12d696bf3882e888629f95b81e7683.zip
r19900: Fix klokwork ID 3148, 3149
(This used to be commit 1f3e20ef3985a0a16e8945907611654ef5e884c4)
-rw-r--r--source3/lib/ldb/ldb_tdb/ldb_index.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/lib/ldb/ldb_tdb/ldb_index.c b/source3/lib/ldb/ldb_tdb/ldb_index.c
index 2a862c02d6..d7a8e5e9b5 100644
--- a/source3/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source3/lib/ldb/ldb_tdb/ldb_index.c
@@ -642,6 +642,10 @@ static int ltdb_index_filter(const struct dn_list *dn_list,
struct ldb_reply *ares = NULL;
unsigned int i;
+ if (!ac) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
+
for (i = 0; i < dn_list->count; i++) {
struct ldb_dn *dn;
int ret;
@@ -722,6 +726,10 @@ int ltdb_search_indexed(struct ldb_handle *handle)
struct dn_list *dn_list;
int ret;
+ if ((ac == NULL) || (ltdb == NULL)) {
+ return -1;
+ }
+
if (ltdb->cache->indexlist->num_elements == 0 &&
ac->scope != LDB_SCOPE_BASE) {
/* no index list? must do full search */