]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/lastmod.c
Each refint op needs a unique timestamp, must perform searches as rootdn
[openldap] / servers / slapd / overlays / lastmod.c
index 63a30e6301fece21a0e0276849db76fd3b6e579e..f669709fc25fa8f2602d14399a35737f6e1b56d3 100644 (file)
@@ -1,7 +1,7 @@
 /* lastmod.c - returns last modification info */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2004-2005 The OpenLDAP Foundation.
+ * Copyright 2004-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -767,6 +767,7 @@ lastmod_db_init(
                                Debug( LDAP_DEBUG_ANY, "lastmod_init: "
                                        "null OID for attributeType '%s'\n",
                                        mat[i].name, 0, 0 );
+                               ldap_attributetype_free( at );
                                return -1;
                        }
        
@@ -775,6 +776,7 @@ lastmod_db_init(
                                Debug( LDAP_DEBUG_ANY, "lastmod_init: "
                                        "%s in attributeType '%s'\n",
                                        scherr2str(code), mat[i].name, 0 );
+                               ldap_attributetype_free( at );
                                return -1;
                        }
                        ldap_memfree(at);
@@ -810,6 +812,7 @@ lastmod_db_init(
                                Debug( LDAP_DEBUG_ANY,
                                        "objectClass '%s' has no OID\n" ,
                                        moc[i].name, 0, 0 );
+                               ldap_objectclass_free( oc );
                                return -1;
                        }
 
@@ -818,6 +821,7 @@ lastmod_db_init(
                                Debug( LDAP_DEBUG_ANY,
                                        "objectClass '%s': %s \"%s\"\n" ,
                                        moc[i].name, scherr2str(code), err );
+                               ldap_objectclass_free( oc );
                                return -1;
                        }
        
@@ -995,7 +999,7 @@ lastmod_db_destroy(
 static slap_overinst           lastmod;
 
 int
-lastmod_init()
+lastmod_initialize()
 {
        lastmod.on_bi.bi_type = "lastmod";
        lastmod.on_bi.bi_db_init = lastmod_db_init;
@@ -1020,7 +1024,7 @@ lastmod_init()
 int
 init_module( int argc, char *argv[] )
 {
-       return lastmod_init();
+       return lastmod_initialize();
 }
 #endif /* SLAPD_OVER_LASTMOD == SLAPD_MOD_DYNAMIC */