From: Pierangelo Masarati Date: Mon, 22 Aug 2005 16:01:16 +0000 (+0000) Subject: fix cleanup on error X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~616 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d4ec31f67768c16f190967d7a09dc0e30567041e;p=openldap fix cleanup on error --- diff --git a/servers/slapd/syntax.c b/servers/slapd/syntax.c index 0469e308cb..286ece7e2f 100644 --- a/servers/slapd/syntax.c +++ b/servers/slapd/syntax.c @@ -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 ); }