mirror of
https://github.com/samba-team/samba.git
synced 2025-03-03 12:58:35 +03:00
r19900: Fix klokwork ID 3148, 3149
(This used to be commit 1f3e20ef3985a0a16e8945907611654ef5e884c4)
This commit is contained in:
parent
a12fb3afdd
commit
2685e167fa
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user