Skip to content

Commit e8a0c3d

Browse files
committed
BUG#25495393: GROUP REPLICATION CAN USE SOME VERBOSITY IN THE ERROR LOG
Fix a memory leak on Gcs_view handling on gcs_event_handlers.cc.
1 parent c3c7f41 commit e8a0c3d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

rapid/plugin/group_replication/src/gcs_event_handlers.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,18 @@ Plugin_gcs_events_handler::on_view_changed(const Gcs_view& new_view,
537537

538538
if (!is_leaving)
539539
{
540+
std::string view_id_representation= "";
541+
Gcs_view *view= gcs_module->get_current_view();
542+
if (view != NULL)
543+
{
544+
view_id_representation= view->get_view_id().get_representation();
545+
delete view;
546+
}
547+
540548
log_message(MY_INFORMATION_LEVEL,
541549
"Group membership changed to %s on view %s.",
542550
group_member_mgr->get_string_current_view_active_hosts().c_str(),
543-
gcs_module->get_current_view()->get_view_id().get_representation().c_str());
551+
view_id_representation.c_str());
544552
}
545553
else
546554
{

0 commit comments

Comments
 (0)