From: jinyaoguo Date: Tue, 3 Jun 2025 21:00:11 +0000 (-0400) Subject: ITS#10348 Relase memory allocated from ch_malloc in 2 error handling branches. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8cf181243198ea065571a7086d2ccdd74d979c1e;p=thirdparty%2Fopenldap.git ITS#10348 Relase memory allocated from ch_malloc in 2 error handling branches. --- diff --git a/servers/slapd/back-ldap/monitor.c b/servers/slapd/back-ldap/monitor.c index c4df22d4cd..b11b1d91cc 100644 --- a/servers/slapd/back-ldap/monitor.c +++ b/servers/slapd/back-ldap/monitor.c @@ -824,6 +824,7 @@ ldap_back_monitor_ops_init( "ldap_back_monitor_ops_init: " "unable to register entry \"%s\" for monitoring\n", e->e_name.bv_val ); + ch_free( counter ); ch_free( cb ); break; } diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 9deac37a5f..3a204ddd60 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -3696,6 +3696,7 @@ syncrepl_dirsync_message( Debug( LDAP_DEBUG_ANY, "syncrepl_dirsync_message: %s unknown attributeType %s\n", si->si_ridtxt, tmp.sml_type.bv_val ); + ch_free( mod ); return rc; } mod->sml_desc = ad;