]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9526 slapd-mdb tools: fix cursor init check
authorHoward Chu <hyc@openldap.org>
Sun, 18 Apr 2021 16:51:30 +0000 (17:51 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 19 Apr 2021 16:25:48 +0000 (16:25 +0000)
servers/slapd/back-mdb/tools.c

index 5fa67b0103716356e6bfdac67bc46dbcd63ccf68..d1beb99d9b3c2523311f2337a700d3b7f97c3045 100644 (file)
@@ -649,6 +649,8 @@ ID mdb_tool_entry_put(
                                 text->bv_val, 0, 0 );
                        return NOID;
                }
+       }
+       if ( !idcursor ) {
                rc = mdb_cursor_open( mdb_tool_txn, mdb->mi_id2entry, &idcursor );
                if( rc != 0 ) {
                        snprintf( text->bv_val, text->bv_len,