/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
};
static Avlnode *syn_index = NULL;
-static LDAP_SLIST_HEAD(SyntaxList, slap_syntax) syn_list
+static LDAP_SLIST_HEAD(SyntaxList, Syntax) syn_list
= LDAP_SLIST_HEAD_INITIALIZER(&syn_list);
static int
code = syn_add( syn, def, &err );
- ldap_memfree( syn );
-
if ( code ) {
Debug( LDAP_DEBUG_ANY, "Error in register_syntax: %s %s in %s\n",
scherr2str(code), err, def->sd_desc );
+ ldap_syntax_free( syn );
return( -1 );
}
+ ldap_memfree( syn );
+
return( 0 );
}