]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/init.c
Happy New Year!
[openldap] / servers / slapd / back-bdb / init.c
index f08b113e7899d5436a848e79bf9f0a97a7fe3489..18d7d56c11cb4f437ed2642d902d5eaaed67e2cd 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2014 The OpenLDAP Foundation.
+ * Copyright 2000-2016 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -406,6 +406,7 @@ shm_retry:
                        Debug( LDAP_DEBUG_ANY,
                                LDAP_XSTRING(bdb_db_open) ": %s\n",
                                cr->msg, 0, 0 );
+                       ch_free( db );
                        goto fail;
                }
 
@@ -419,6 +420,8 @@ shm_retry:
                                Debug( LDAP_DEBUG_ANY,
                                        LDAP_XSTRING(bdb_db_open) ": %s\n",
                                        cr->msg, 0, 0 );
+                               db->bdi_db->close( db->bdi_db, 0 );
+                               ch_free( db );
                                goto fail;
                        }
                }
@@ -433,6 +436,8 @@ shm_retry:
                                Debug( LDAP_DEBUG_ANY,
                                        LDAP_XSTRING(bdb_db_open) ": %s\n",
                                        cr->msg, 0, 0 );
+                               db->bdi_db->close( db->bdi_db, 0 );
+                               ch_free( db );
                                goto fail;
                        }
                }
@@ -504,6 +509,7 @@ shm_retry:
                                LDAP_XSTRING(bdb_db_open) ": %s\n",
                                cr->msg, 0, 0 );
                        db->bdi_db->close( db->bdi_db, 0 );
+                       ch_free( db );
                        goto fail;
                }
 
@@ -845,6 +851,7 @@ bdb_back_initialize(
        bi->bi_tool_sync = 0;
        bi->bi_tool_dn2id_get = bdb_tool_dn2id_get;
        bi->bi_tool_entry_modify = bdb_tool_entry_modify;
+       bi->bi_tool_entry_delete = bdb_tool_entry_delete;
 
        bi->bi_connection_init = 0;
        bi->bi_connection_destroy = 0;