From: Howard Chu Date: Thu, 25 Jan 2007 07:22:39 +0000 (+0000) Subject: connection_fake_init can leak SLAPI extensions. X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~144 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0126348461d3bd44350013bfb027b1f65cef4d9f;p=openldap connection_fake_init can leak SLAPI extensions. --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index bb024ee69f..ce2c8f6e92 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -1974,8 +1974,13 @@ connection_fake_init( connection_init_log_prefix( op ); #ifdef LDAP_SLAPI - slapi_int_create_object_extensions( SLAPI_X_EXT_CONNECTION, conn ); - slapi_int_create_object_extensions( SLAPI_X_EXT_OPERATION, op ); + /* FIXME: somebody needs to destroy these. Perhaps they should + * only be allocated on the slab. + */ + if ( slapi_plugins_used ) { + slapi_int_create_object_extensions( SLAPI_X_EXT_CONNECTION, conn ); + slapi_int_create_object_extensions( SLAPI_X_EXT_OPERATION, op ); + } #endif /* LDAP_SLAPI */ slap_op_time( &op->o_time, &op->o_tincr );