mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
fix cleanup on error
This commit is contained in:
parent
bf37d12686
commit
d4ec31f677
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user