From: Howard Chu Date: Fri, 12 Jun 2009 11:57:56 +0000 (+0000) Subject: txn may fail to give us a scan op X-Git-Tag: ACLCHECK_0~498 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=22f6e45f2a2893d4a48f00ddf93e7eaf70371b66;p=openldap txn may fail to give us a scan op --- diff --git a/servers/slapd/back-ndb/search.cpp b/servers/slapd/back-ndb/search.cpp index 8a66ffc760..c6668ff5a5 100644 --- a/servers/slapd/back-ndb/search.cpp +++ b/servers/slapd/back-ndb/search.cpp @@ -634,6 +634,10 @@ int ndb_back_search( Operation *op, SlapReply *rs ) } scan = txn->getNdbIndexScanOperation( "PRIMARY", DN2ID_TABLE ); + if ( !scan ) { + rs->sr_err = LDAP_OTHER; + goto leave; + } scan->readTuples( NdbOperation::LM_CommittedRead ); rc = ndb_dn2bound( scan, &rdns );