]> git.sur5r.net Git - openldap/commitdiff
More for multival attrs
authorHoward Chu <hyc@openldap.org>
Fri, 22 Jul 2016 09:30:57 +0000 (10:30 +0100)
committerHoward Chu <hyc@openldap.org>
Fri, 22 Jul 2016 09:30:57 +0000 (10:30 +0100)
Fix id2entry_delete when deleting last multival entry in DB

servers/slapd/back-mdb/id2entry.c

index fe1f882732cd35cacc3d14ae087533845d81b9a6..d69e6a52aa2f3bfeb81af16969ae69fd02b07a86 100644 (file)
@@ -407,7 +407,12 @@ int mdb_id2entry_delete(
                rc = mdb_cursor_del( mvc, MDB_NODUPDATA );
                if (rc)
                        return rc;
-               mdb_cursor_get( mvc, &key, NULL, MDB_GET_CURRENT );
+               rc = mdb_cursor_get( mvc, &key, NULL, MDB_GET_CURRENT );
+               if (rc) {
+                       if (rc == MDB_NOTFOUND)
+                               rc = MDB_SUCCESS;
+                       break;
+               }
        }
        return rc;
 }