fix cleanup on error

This commit is contained in:
Pierangelo Masarati 2005-08-22 16:01:16 +00:00
parent bf37d12686
commit d4ec31f677

View File

@ -178,15 +178,16 @@ register_syntax(
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 );
}